jacinle.web.session#
Classes
Class InMemorySessionManager
- class InMemorySessionManager[source]#
Bases:
KVBasedSessionManager
- __new__(**kwargs)#
- get(request_handler)#
- new(request_handler)#
- set(request_handler, identifier, data)#
- property secret#
Class KVBasedSessionManager
- class KVBasedSessionManager[source]#
Bases:
SessionManagerBase
- __init__(secret, kvstore, timeout, cookie_prefix='jac_ses_', kv_prefix='jac_ses_')[source]#
- Parameters:
secret (str)
kvstore (KVStoreBase)
timeout (int)
cookie_prefix (str)
kv_prefix (str)
- __new__(**kwargs)#
- new(request_handler)#
- property secret#
Class MemcachedSessionManager
- class MemcachedSessionManager[source]#
Bases:
KVBasedSessionManager
- __init__(secret, memcache_host, memcache_port, timeout, cookie_prefix='jac_ses_', kv_prefix='jac_ses_')[source]#
- __new__(**kwargs)#
- get(request_handler)#
- new(request_handler)#
- set(request_handler, identifier, data)#
- property secret#
Class Session
Class SessionIdentifier
- class SessionIdentifier[source]#
Bases:
SessionIdentifier
- __add__(value, /)#
Return self+value.
- __init__()#
- __mul__(value, /)#
Return self*value.
- static __new__(_cls, session_id, hmac_key)#
Create new instance of SessionIdentifier(session_id, hmac_key)
- count(value, /)#
Return number of occurrences of value.
- index(value, start=0, stop=9223372036854775807, /)#
Return first index of value.
Raises ValueError if the value is not present.
Class SessionManagerBase