What sessions mainly do are identity map and unit of work.
Session is an object which manages Python objects that represent Redis values e.g. lists, sets, hashes. It maintains identity maps between Redis values and Python objects, and deals with transactions.
Parameters: | client (redis.client.Client) – the Redis client |
---|
Loads the value from the key. If value_type is present the value will be treated as it, or ByteString by default.
Parameters: |
|
---|---|
Returns: | the loaded value |
(str) Redis server version string e.g. '2.2.11'.
(tuple) Redis server version triple e.g. (2, 2, 11). You can compare versions using this property.
Stores the value into the key. If value_type is present the value will be treated as it, or ByteString by default.
Parameters: |
|
---|---|
Returns: | the Python representation of the saved value. it is equivalent to the given value but may not equal nor the same to |