sslmode support for psycopg2

Issue #262 resolved
Former user created an issue

psycopg2 supports an sslmode argument to allow ssl connections. As far as I can tell, there is no standard way to set the sslmode attribute using SA. I marked the severity as major because I consider the ability to make SSL connections important.

Comments (1)

  1. Mike Bayer repo owner

    keyword arguments can be supplied to the database connector in the following manners (keep in mind i have no idea of the specific method to supply "sslmode" to a psycopg connection):

    e = create_engine('postgres://url', sslmode=True)
    
    
    
    e = create_engine('postgres://url?sslmode=something')
    
    
    
    def conn():
        return psycopg.connect(url, arg1, arg2, kwarg1=foo, kwarg2=bar)
    
    e = create_engine(pool=pool.QueuePool(conn, pool_size=20, max_overflow=40))
    

    if none of those methods do it, then reopen the ticket.

  2. Log in to comment