MasoniteFramework / orm

Masonite ORM is a beautiful Python ORM. It's also a nearly drop in replacement of the Orator ORM
https://orm.masoniteproject.com
MIT License
160 stars 47 forks source link

Postgres psycopg2 TLS connectivity #875

Open nictrix opened 4 months ago

nictrix commented 4 months ago

Describe the feature as you'd like to see it

I don't think connecting to a Postgres Database over TLS is currently possible based on what code I saw when connecting via psycopg2. I would like to use `sslmode, sslrootcert options and that doesn't appear to be possible.

What do we currently have to do now?

Please confirm if this is a valid feature to add, if so I can submit some code to enable this ability. I believe all we need to do is add on a general **kwargs parameter to the make_connection function and pass that along since psycopg2 can handle it.

Additional context

Great project by the way! Really appreciate the work put into it!

josephmancuso commented 3 months ago

I agree with this. as long as we can pass it to the psycopg2 connection class we can make a configuration for it in the connection settings