maaudet
maaudet

Reputation: 2358

How to use SQLAlchemy in this context

I want to do the following:

What I currently have in head is the classic approach of connecting to the database, store the connection to the database in an object (as a variable) that is passed in the threads that are spawned by the connection listener, then these threads use the variable in the object to do what they need to do with the database connection. (I know that multi-processing is better then multi-threading in Python, but it's not related to my question at this time)

Now my question, how should I use SQLAlchemy in this context? I am quite confused even although I have been reading quite a lot of documentation about it and there doesn't seem to be "good" examples on how to handle this kind of situation specifically even although I have been searching quite a lot.

Upvotes: 0

Views: 222

Answers (1)

user2665694
user2665694

Reputation:

What is the problem here? SQLAlchemy maintains a thread-local connection pool..what else do you need?

Upvotes: 1

Related Questions