python - How to use connection pooling with psycopg2 (postgresql) with Flask -
python - How to use connection pooling with psycopg2 (postgresql) with Flask -
how should utilize psycopg2 flask? suspect wouldn't open new connection every request how can open 1 , create globally available application?
from flask import flask app = flask(__name__) app.config.from_object('config') # can access configuration variables via app.config["var_name"]. import psycopg2 import myapp.views python flask psycopg2
Comments
Post a Comment