redish

Pythonic Redis abstraction built on top of redis-py
Download

redish Ranking & Summary

Advertisement

  • Rating:
  • License:
  • BSD License
  • Price:
  • FREE
  • Publisher Name:
  • Ask Solem
  • Publisher web site:
  • http://search.cpan.org/~asksh/Modwheel-0.3.3/lib/Modwheel.pm

redish Tags


redish Description

Pythonic Redis abstraction built on top of redis-py redish is a Pythonic Redis abstraction built on top of redis-py.Braindump:>>> from redish.client import Client>>> x = Client()# Key/Value>>> x = {"name": "George"}>>> x{'name': 'George'}>>> del(x)>>> xTraceback (most recent call last):File "", line 1, in File "redish/client.py", line 52, in __getitem__ raise KeyError(key)KeyError: 'foo'# Sets>>> s = x.Set("myset")>>> map(s.add, )>>> "opera" in sTrue>>> s.remove("safari")>>> "safari" in sFalse>>> list(s)>>> s2 = x.Set("myset2")>>> map(s2.add, )>>> s.difference(s2)set()# Sorted Set>>> z = x.SortedSet("myzset")>>> z.add("foo", 0.9)True>>> z.add("bar", 0.1)True>>> z.add("baz", 0.3)True>>> zInstallation:You can install redish either via the Python Package Index (PyPI) or from source.To install using pip,:pip install redishTo install using easy_install,:easy_install redishIf you have downloaded a source tarball you can install it by doing the following,:python setup.py buildpython setup.py install # as root Requirements: · Python


redish Related Software