-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support native URI/DSNs #160
Comments
SQLite
Postgres
Where I'm atI've updated dsnparse to better parse native postgres and sqlite connection strings. The next thing to do is update the sqlite3.connect("file:<DB-NAME>?mode=ro", uri=True) And Postgres: psycopg2.connect(dsn="dbname=test user=postgres password=secret") SQLite's DSNs should be no problem, if I see |
It would also be great to support connecting through environment variables. Here are the Postgres environment variables: It would also be great to connect using the postgres password file search and links
The biggest issue here is how to auto-discover that the environment has been used. If I have like an |
This might actually not be desirable behavior and could lead to unintended consequences, like an important db being cleared simply because prom was run in an environment that had postgres environment variables in it |
I think I could support this if I allowed something like:
that would tell prom to use the You could have shorthand and still have connection names:
I might be better if we reverse it:
It would work the same way but then we don't need a toplevel |
https://docs.python.org/3.11/library/sqlite3.html#how-to-work-with-sqlite-uris
The text was updated successfully, but these errors were encountered: