repoze.session API


class repoze.session.manager.SessionDataManager(timeout, period, when=None)

An object that manages sessions.

get(key, when=None)

If an object already exists in the manager with key “k”, it is returned.

Otherwise, create a new subobject of the type supported by this container with key “k” and return it.

Return true if manager has value associated with key k, else return false.
query(key, default=None)
Return value associated with key k. If value associated with k does not exist, return default.
class repoze.session.manager.SessionBeginEvent(session)
An event that is sent via zope.event.notify when a session begins.
class repoze.session.manager.SessionEndEvent(session)
An event that is sent via zope.event.notify when a session ends.
class repoze.session.manager.FileStorageSessionManagerFactory(filename, appname, timeout=1200, period=20)
Create a factory that is, in turn, capable of creating a session manager. The session manager is stored in a ZODB FileStorage. filename is he ZODB filestorage filename, appname is the name in the ZODB under which the session manager will be stored. timeout is the session manager timeout, and period is the session manager period
class repoze.session.manager.ConnectionManager

An object willing to manage a ZODB database connection

Close the connection.
commit(transaction=<module 'transaction' from '/home/repoze/www/'>)
Commit a transaction.


Dictionary-like object that supports additional methods and attributes concerning invalidation. expiration and conflict resolution.

Return the time the session data was last modified in integer seconds-since-the-epoch form. Modification generally implies a call to one of the session data object’s __setitem__ or __delitem__ methods, directly or indirectly as a result of a call to update, clear, or other mutating data access methods. This value can be assigned.
Return the time the session data object was created in integer seconds-since-the-epoch form. This attribute cannot be assigned.
Invalidate (expire) the session data object.
Return true if session data object is still valid, false if not. A session data object is valid if its invalidate method has not been called.

SessionData objects support the full Python dictionary interface (e.g. __getitem__, __delitem__, get, has_key, etc).