Skip to main content

redish - Pythonic Redis abstraction built on top of redis-py

Version:

0.0.1

Introduction

Braindump:

>>> from redish.client import Client
>>> x = Client()

# Key/Value
>>> x["foo"] = {"name": "George"}
>>> x["foo"]
{'name': 'George'}
>>> del(x["foo"])
>>> x["foo"]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "redish/client.py", line 52, in __getitem__
    raise KeyError(key)
KeyError: 'foo'

# Sets

>>> s = x.Set("myset")
>>> map(s.add, ["opera", "firefox", "ie", "safari"])
[True, True, True, True]
>>> "opera" in s
True
>>> s.remove("safari")
>>> "safari" in s
False
>>> list(s)
['opera', 'ie', 'firefox']
>>> s2 = x.Set("myset2")
>>> map(s2.add, ["opera", "firefox", "mosaic"])
[True, True, True]
>>> s.difference(s2)
set(['opera', 'firefox', 'mosaic'])

# Sorted Set

>>> z = x.SortedSet("myzset")
>>> z.add("foo", 0.9)
True
>>> z.add("bar", 0.1)
True
>>> z.add("baz", 0.3)
True
>>> z[0:3]
['bar', 'baz', 'foo']

Installation

You can install redish either via the Python Package Index (PyPI) or from source.

To install using pip,:

$ pip install redish

To install using easy_install,:

$ easy_install redish

If you have downloaded a source tarball you can install it by doing the following,:

$ python setup.py build
# python setup.py install # as root

Examples

Metadata

Release files for redish 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for redish 0.0.1
File Size Uploaded Provenance Actions
redish-0.0.1.tar.gz 101.7 kB Without provenance Details for redish-0.0.1.tar.gz

Release files / redish-0.0.1.tar.gz

Download URL redish-0.0.1.tar.gz
Size 101.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d81db76cba4ab5975fba3664d8f5cf5f016e0fb843ae6665a06123e7e411cd48
BLAKE2b-256 checksum
How to use checksums
bc43c7760e672ec9fbe1593aa0bddb00e850fb949432fa71903427bfa2549994
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for redish 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page