AG

Angelo Gladding
lahacker.net

dlv5vbq7lzlthol5 4b942a3185b37d00

angelo@lahacker.net

South Pasadena, California, United States currently feels like 56°F

Home CodekvAPI

kv

an opinionated Pythonic Redis interface

Redis is an open-source, networked, in-memory, key-value data store with optional durability. This module provides an interface to a database that maps Redis keys' data structures to their Python equivalents.

>>> db = Database("/tmp/kv-test", {"foo": "list"})
>>> db["foo"] = ["bar", "bat", "baz"]
>>> "bar" in db["foo"]
True
>>> len(db["foo"])
3

Members

Functions

db(prefix: str=None, delimiter=':', *schemas, **patterns) -> kv.Database

return a connection to a redis database

listing A A

Classes

Database

a Redis database interface

define(self, *schemas)

listing A A

cursor

listing A A

keys

listing A A

get_value(self, key)

listing A A

intersection(self, *sets)

listing A A

__getitem__(self, key)

listing A A

__setitem__(self, key, value)

listing A A

__delitem__(self, key)

listing A A

__contains__(self, key)

listing A A

Metrics

full listing

Lines of Code

Source Docstrings Comments
785 0 103