https://github.com/jaredlunde/redis_structures
Pythonic data structures backed by Redis.
https://github.com/jaredlunde/redis_structures
persistent-data-structure python python3 redis redis-structures redis-wrapper wrapper
Last synced: 6 months ago
JSON representation
Pythonic data structures backed by Redis.
- Host: GitHub
- URL: https://github.com/jaredlunde/redis_structures
- Owner: jaredLunde
- License: mit
- Created: 2015-03-11T19:24:01.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2018-08-18T18:29:55.000Z (over 7 years ago)
- Last Synced: 2025-07-11T15:07:18.518Z (7 months ago)
- Topics: persistent-data-structure, python, python3, redis, redis-structures, redis-wrapper, wrapper
- Language: Python
- Homepage: http://docr.it/redis_structures
- Size: 89.8 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
===============================
Redis Structures
===============================
Redis data structures wrapped with Python 3.
`Full documentation can be found at http://docr.it/redis_structures
`_
.. image:: https://travis-ci.org/jaredlunde/redis_structures.svg?branch=master
:target: https://travis-ci.org/jaredlunde/redis_structures
Installation
------------
redis_structures requires a running Redis server. See `Redis's quickstart
`_ for installation instructions.
To install redis_structures:
.. code-block:: bash
$ sudo pip install redis_structures
or from source:
.. code-block:: bash
$ git clone https://github.com/jaredlunde/redis_structures
$ cd redis_structures
$ sudo python setup.py install
Getting Started
---------------
.. code-block:: pycon
>>> from redis_structures import StrictRedis, RedisHash
>>> client = StrictRedis(host='localhost', port=6379, db=0)
>>> rh = RedisHash("my_hash", prefix="rs:hash" client=StrictRedis)
>>> rh['hello'] = "world" # sets the field name 'hello' to value 'world' in
>>> # redis under the key rs:hash:my_hash
>>> rh['hello']
'world'
>>> del rh['hello']
>>> rh.get('hello')
None