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

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -