Skip to content

Instantly share code, notes, and snippets.

View oscarmlage's full-sized avatar

Oscar M. Lage oscarmlage

View GitHub Profile
@graffic
graffic / zodb.py
Last active December 30, 2015 02:59
Simple ZODB support in Flask. Works with ZODB4
"""
ZODB support in flask
Usage: `DB = FlaskZODB(APP)`
In your views use `DB.root` to get the database root dictionary.
"""
from flask import _app_ctx_stack as stack
import transaction
import zodburi