Redis python interface that serializes all values using json, pickle, msgpack or a custom serializer.
Project description
serialized-redis
========
Redis python interface that serializes all values using json, pickle, msgpack or a custom serializer.
Getting Started
---------------
.. code-block:: pycon
>>> import serialized_redis
>>> r = serialized_redis.JSONSerializedRedis(host='localhost', port=6379, db=0)
>>> r.set('foo', { 'test': 'dict' })
True
>>> r.get('foo')
{'test': 'dict'}
>>> r = serialized_redis.PickleSerializedRedis(host='localhost', port=6379, db=0)
>>> r.set('foo', { 'test': 'dict' })
True
>>> r.get('foo')
{'test': 'dict'}
>>> r = serialized_redis.MsgpackSerializedRedis(host='localhost', port=6379, db=0)
>>> r.set('foo', { 'test': 'dict' })
True
>>> r.get('foo')
{'test': 'dict'}
serialized-redis extends `redis-py <https://github.com/andymccurdy/redis-py>`_ and uses the same interface.
Limitations
-----------
As values are serialized, Redis operations that manipulate or extract data from values are not supported.
* SORT commands may not return correct order depending on the serializer used.
* ZSCAN and SSCAN MATCH option will only work for exact match.
* all lexicographical commands like ZLEXCOUNT, ZREMRANGEBYLEX and ZREVRANGEBYLEX are not supported
* INCR is only supported with JSON serializer
========
Redis python interface that serializes all values using json, pickle, msgpack or a custom serializer.
Getting Started
---------------
.. code-block:: pycon
>>> import serialized_redis
>>> r = serialized_redis.JSONSerializedRedis(host='localhost', port=6379, db=0)
>>> r.set('foo', { 'test': 'dict' })
True
>>> r.get('foo')
{'test': 'dict'}
>>> r = serialized_redis.PickleSerializedRedis(host='localhost', port=6379, db=0)
>>> r.set('foo', { 'test': 'dict' })
True
>>> r.get('foo')
{'test': 'dict'}
>>> r = serialized_redis.MsgpackSerializedRedis(host='localhost', port=6379, db=0)
>>> r.set('foo', { 'test': 'dict' })
True
>>> r.get('foo')
{'test': 'dict'}
serialized-redis extends `redis-py <https://github.com/andymccurdy/redis-py>`_ and uses the same interface.
Limitations
-----------
As values are serialized, Redis operations that manipulate or extract data from values are not supported.
* SORT commands may not return correct order depending on the serializer used.
* ZSCAN and SSCAN MATCH option will only work for exact match.
* all lexicographical commands like ZLEXCOUNT, ZREMRANGEBYLEX and ZREVRANGEBYLEX are not supported
* INCR is only supported with JSON serializer
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for serialized-redis-interface-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6cd240657cbf84144d3439ad7451a00f1e32b5adefb23de9c4746aac53afea1 |
|
MD5 | ad9dd3f3235d4683c08ce71486d2b10f |
|
BLAKE2b-256 | ce66ddc75b2f35b73cc983c08f209f15a180d8229841eae43c47410fd07e8ca7 |
Close
Hashes for serialized_redis_interface-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73b0dba050709b72c7ef469b274f55d8c699bd537d1e5615deee8d0ff26629f0 |
|
MD5 | dbd75db77f9537c8fda4cfd3150d7956 |
|
BLAKE2b-256 | 8f96ed6695d1b74a63d458420c3600438375780d9fe2c952470770b47187f31d |