I'm using SQLalchemy for a Python project, and I want to have a tidy connection string to access my database. So for example:
engine = create_engine('postgres://user:pass@host/database')
The problem is my password contains a sequence of special characters that get interpreted as delimiters when I try to connect.
I realize I could just create an object and then pass my credentials like this:
drivername = 'postgres',
username = 'user',
password = 'pass',
host = 'host',
database = 'database'
But I'd much rather use a connection string if this is possible.
So to be clear, is it possible to encode my connection string, or the password part of the connection string - so that it can be properly parsed?