sslkey paramterer in the connection string to indicate the files you want.
con=psycopg2_connect(dsn='host=host1 user=yourname sslcert=host1.crt sskkey=host1.key')
probably something using string::format would be more practical.
If that seems too messy
Using a service definition to store the parameters is another option
define the connection paramaters (like above) for each server in
pg_services.conf (create that file) and use connection strings like
other clients (like psql) can also use the services thus defined, so this way will save you typing in the future.
but it seems redash is configured using environment variables with the database as as a URL perhaps like this:
like this with a service definition
like this explicitly:
from a bries sfan of the docs redash seems to use
postgres for db_user and db_name
so far as I know libpq does not use a different interface for database names, connection strings, and database urls, where one can be used any other form can be used instead, however the redash docs say to use a URL.