Solutions for data storage?

Robert Brewer fumanchu at amor.org
Thu Jan 20 09:42:21 CET 2005


Leif K-Brooks wrote:
> Robert Brewer wrote:
> > Try svn://casadeamor.com/dejavu/trunk if you want a truly 
> Pythonic query
> > syntax. Wait a couple of days, and I'll have version 1.3 ready and
> > online at http://www.aminus.org/rbre/python -- lots of changes from
> > 1.2.6 which is there now, but at least you can read old 
> docs online now
> > without svn.
> 
> Thanks a lot for the reply. I've skimmed the documentation (very 
> well-written, by the well), and I really like the looks of what I've 
> seen so far. I'm a bit confused about where sandboxes get created, 
> though; in a Web application, would I give each request a 
> sandbox of its 
> own, or create one for the entire application, or what?

Correct; in a Web application, each request should get its own sandbox.
Here's a sample mod_python request.py script, where "cation" is my
webapp framework, and "mcontrol" is the name of the app itself, which
possesses a Dejavu arena object.

------------

from cation.html.uimodpython import UserInterfaceModPython
import mcontrol

def handler(req):
    ui = UserInterfaceModPython(mcontrol.application)
    ui.sandbox = mcontrol.arena.new_sandbox()
    ui.request(req)
    ui.sandbox.flush_all()
    return ui.status_code

------------


Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org

P.S. I've finally tested postgres, mysql, and sqlite on both Debian
Linux and Windows 2k, and made the final updates. So the 1.3 release
should be _very_ soon.



More information about the Python-list mailing list