Closed bochecha closed 4 years ago
@adarnimrod with this, you'll be able to do the following in the configuration file:
[postgresql.connect_args]
sslmode = "require"
sslcert = "/path/to/cert"
connect_timeout = 3
Thanks. That's exactly what I wanted.
PostgreSQL's libpq supports many connection arguments:
https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS
SQLAlchemy makes it easy to pass them down to PsycoPG2 and libpq:
https://docs.sqlalchemy.org/en/13/core/engines.html#custom-dbapi-args
This commit introduces a new "connect_args" configuration table, nested under the "postgresql" one.
It can be passed arbitrary key/values, like "sslmode" or "connect_timeout" for example.
Fixes #74