简体   繁体   中英

Does cx_Oracle works with flask-python?

I'm wondering if cx_Oracle works with flask-python.

if so, please share with me a good documentation. it will be great.

Thank you All for your help.

See my blog post How to use Python Flask with Oracle Database which has a runnable example.

The key thing is that during application initialization you will want to start a connection pool with cx_Oracle.SessionPool() . Then each route can get a connection from the pool with connection = pool.acquire()

Also see https://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/apaas/python/python-oracle-accs/python-oracle-accs.html , however this doesn't use a connection pool so it has some scalability limitations.

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