Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Provides scoped management of :class:`.Session` objects.

See :ref:`unitofwork_contextual` for a tutorial.

src/s/a/sawhoosh-HEAD/sawhoosh/security.py   sawhoosh(Download)
from pyramid.decorator import reify
from pyramid.request import Request
 
from sawhoosh.search import WIX
from sawhoosh.model import DBSession
 
class RequestWithDBAttribute(Request):
    @reify
    def db(self):
        return DBSession()