kennethreitz / records

SQL for Humans™
https://pypi.python.org/pypi/records/
ISC License
7.16k stars 572 forks source link

Any way to pass connect_args={'sslmode': 'prefer'} with DB_URL? #85

Closed davidthewatson closed 8 years ago

davidthewatson commented 8 years ago

I have to connect to Amazon redshift via database URI over a tunnel. Thus, I need to use:

connect_args={'sslmode': 'prefer'}

passed down to the sqlalchemy-redshift driver but I don't see any way to do this with the constructor:

   db = records.Database(db_url=db_url)

as documented here:

https://github.com/binarydud/redshift_sqlalchemy/issues/36

I'm confused because the constructor here:

https://github.com/kennethreitz/records/blob/a49f8aa5c5102448d9ac45c9ba71ca9fa396f236/records.py#L199

clearly takes a kwargs argument and passes it onto the underlying engine which would solve my problem, but none of the versions I get installed via pip take it. I've tried pip installing via git but that doesn't seem to get the version in the aforementioned link either.

Any ideas?

Thanks!

davidthewatson commented 8 years ago

Closing. This was solved by:

pip install --upgrade git+https://github.com/kennethreitz/records.git