简体   繁体   中英

Is it safe to use SQLalchemy with gevent?

I know that some database drivers and other libraries providing connection to external services are incompatible with coroutine-based network libraries. However, I couldn't find out if SQLAlchemy can be safely used with such libraries (namely, gevent ), and if any workarounds should be applied to exclude possible errors.

Can you either tell me that or point me to an article where I can read this information? An additional 'thank you' if the provided answer also contains explanation of the mechanics of why it is okay or why it isn't. :-)

Did you try searching gevent google group for SQLAlchemy ?

I found this report of using SQLAlchemy + mysql-connector successfully and this of using SQLAlchemy + psycopg2 successfully (make sure you've read this )

I would think SQLAlchemy should be safe to use with gevent as long as the database driver that SQLAlchemy uses is safe, but I've not tried it myself and only basing this on the reports from other users.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM