I'm trying to use Pyramid to create a simple reporting web interface to an 
existing Oracle database. 
In creating/maintaining this database, I created a wrapper in the form of a 
python class, which has all the methods I need to put data into the db and 
query the data. I've standardized on Python dictionaries for all result 
sets and would like to keep it that way for the web interface.

I now want to use this db wrapper class to get to the database from the 
Pyramid app. I would like the class to persist while the web app runs. I've 
considered accessing the wrapper from my __init__.py program but I'm 
unclear how my views.py class methods will be able to access it then. I 
considered instantiating the wrapper class in the __init__ method of my 
views.py program but noticed that each browser submit causes a new db 
connection. I'd like to use the same connection, or connection pooling.

Could someone kindly advise on a correct approach. I'm relatively new to 
Pyramid and started using Python about a year back for batch business 
processing.

Many thanks folks.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/c5e0193d-239e-4911-8344-034ca3cd0cff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to