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

Popular posts from this blog

Using Android Volley to post an array to PHP -

python - How to add an model instance to a django queryset? -

angularjs - No 'Access-Control-Allow-Origin' error from local domain to public API -