Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
‹EYc	@sddlmZddlmZmZmZddlmZmZddl	m
Z
dgZdefd„ƒYZ
e
Zd„Zx'e
jD]Zee
eeeƒƒqŠWd	„Zx$dD]Zee
eeeƒƒqºWd„Zx$dD]Zee
eeeƒƒqêWdS(i(texc(tScopedRegistrytThreadLocalRegistrytwarni(tclass_mapperR(tSessiontscoped_sessioncBsGeZdZdZdd„Zd„Zd„Zd„Zdd„Z	RS(stProvides scoped management of :class:`.Session` objects.

    See :ref:`unitofwork_contextual` for a tutorial.

    cCs7||_|r$t||ƒ|_nt|ƒ|_dS(sÑConstruct a new :class:`.scoped_session`.

        :param session_factory: a factory to create new :class:`.Session`
         instances. This is usually, but not necessarily, an instance
         of :class:`.sessionmaker`.
        :param scopefunc: optional function which defines
         the current scope.   If not passed, the :class:`.scoped_session`
         object assumes "thread-local" scope, and will use
         a Python ``threading.local()`` in order to maintain the current
         :class:`.Session`.  If passed, the function should return
         a hashable token; this token will be used as the key in a
         dictionary in order to store and retrieve the current
         :class:`.Session`.

        N(tsession_factoryRtregistryR(tselfRt	scopefunc((sK/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.pyt__init__s	cKs‰|r{|jdtƒ}|dk	rk|jjƒrEtjdƒ‚qx|j|}|jj|ƒ|Sq…|j|Sn
|jƒSdS(sÎReturn the current :class:`.Session`, creating it
        using the :attr:`.scoped_session.session_factory` if not present.

        :param \**kw: Keyword arguments will be passed to the
         :attr:`.scoped_session.session_factory` callable, if an existing
         :class:`.Session` is not present.  If the :class:`.Session` is present
         and keyword arguments have been passed,
         :exc:`~sqlalchemy.exc.InvalidRequestError` is raised.

        tscopesEScoped session is already present; no new arguments may be specified.N(	tpoptFalsetNoneRthastsa_exctInvalidRequestErrorRtset(R	tkwRtsess((sK/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.pyt__call__5scCs3|jjƒr"|jƒjƒn|jjƒdS(sæDispose of the current :class:`.Session`, if present.

        This will first call :meth:`.Session.close` method
        on the current :class:`.Session`, which releases any existing
        transactional/connection resources still being held; transactions
        specifically are rolled back.  The :class:`.Session` is then
        discarded.   Upon next usage within the same scope,
        the :class:`.scoped_session` will produce a new
        :class:`.Session` object.

        N(RRtclosetclear(R	((sK/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.pytremovePs
cKs0|jjƒrtdƒn|jj|dS(sreconfigure the :class:`.sessionmaker` used by this
        :class:`.scoped_session`.

        See :meth:`.sessionmaker.configure`.

        stAt least one scoped session is already present.  configure() can not affect sessions that have already been created.N(RRRRt	configure(R	tkwargs((sK/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.pyRas
cs&dtf‡‡fd†ƒY}|ƒS(s"return a class property which produces a :class:`.Query` object
        against the class and the current :class:`.Session` when called.

        e.g.::

            Session = scoped_session(sessionmaker())

            class MyClass(object):
                query = Session.query_property()

            # after mappers are defined
            result = MyClass.query.filter(MyClass.name=='foo').all()

        Produces instances of the session's configured query class by
        default.  To override and use a custom implementation, provide
        a ``query_cls`` callable.  The callable will be invoked with
        the class's mapper as a positional argument and a session
        keyword argument.

        There is no limit to the number of query properties placed on
        a class.

        tquerycseZ‡‡fd†ZRS(csdyHt|ƒ}|rGˆr1ˆ|dˆjƒƒSˆjƒj|ƒSnWntjk
r_dSXdS(Ntsession(RRRtorm_exctUnmappedClassErrorR(tstinstancetownertmapper(t	query_clsR	(sK/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.pyt__get__‰s(t__name__t
__module__R%((R$R	(sK/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.pyRˆs(tobject(R	R$R((R$R	sK/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.pytquery_propertyps
N(
R&R't__doc__RRRRRRR)(((sK/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.pyRs			cs‡fd†}|S(Ncst|jƒˆƒ||ŽS(N(tgetattrR(R	targsR(tname(sK/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.pytdoœs((R-R.((R-sK/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.pyt
instrument›scs+‡fd†}‡fd†}t||ƒS(Ncst|jƒˆ|ƒdS(N(tsetattrR(R	tattr(R-(sK/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.pyR¥scst|jƒˆƒS(N(R+R(R	(R-(sK/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.pytget¨s(tproperty(R-RR2((R-sK/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.pytmakeprop¤stbindtdirtytdeletedtnewtidentity_mapt	is_activet	autoflushtno_autoflushtinfocs‡fd†}t|ƒS(Ncsttˆƒ||ŽS(N(R+R(tclsR,R(R-(sK/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.pyR.³s(tclassmethod(R-R.((R-sK/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.pytclslevel²st	close_alltobject_sessiontidentity_keyN(	sbindsdirtysdeletedsnewsidentity_maps	is_actives	autoflushsno_autoflushsinfo(s	close_allsobject_sessionsidentity_key(tRRtutilRRRRRRRt__all__R(Rt
ScopedSessionR/tpublic_methodstmethR0R4tpropR@(((sK/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/orm/scoping.pyt<module>s 	†