Skip to main content

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




Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

serialized-redis-interface-0.1.0.tar.gz (18.3 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page