--SQLAlchemy -The Python SQL Toolkit and Object Relational MapperTo post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description.---You received this message because you are subscribed to the Google Groups "sqlalchemy" group.To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/ed50fe16-f759-4d14-a111-62457f4009c5o%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlal...@googlegroups.com.
Hello Mike,Thanks for your insight and response.Just want to let you know that, we are using scoped_session with a session_factory object to db connections. Does this approach still suitable for connections using session ?
Also, we have custom module where we have separate functions for generating an engine and creating session object and we import this custom module in other application python files to create and close sessions accordingly.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/a74188cd-aeba-4b27-a9b4-fac4b368cfa4o%40googlegroups.com.
Hello Mike,
I've embedded the following code within the get_session function where the get_engine function returns the engine object. However, I'm still seeing that the rotated database credentials are not being used when creating new connectionsdef get_engine(args):# our code to create enginereturn enginedef get_session(args):db = get_engine(args)@event.listens_for(db, "do_connect")def receive_do_connect(dialect, conn_rec, cargs, cparams):secret = get_new_secret() # used our custom code to get password from secrets managercparams['password'] = secret# create scoped_session using sessionmaker by binding the engine returned from abovereturn sessionWe import get_session from the respective module and import it into other application related modules where it needs database communication.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/b08c2722-d1c0-4c65-85c6-61b4e756680bo%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/b08c2722-d1c0-4c65-85c6-61b4e756680bo%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+...@googlegroups.com.To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/95ab9371-73fc-4835-be86-28fe7ae5f93co%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/95ab9371-73fc-4835-be86-28fe7ae5f93co%40googlegroups.com.