Skip to main content

Limpyd provides an easy way to store objects in Redis, without losing the power and the control of the Redis API, in a limpid way, with just as abstraction as needed.

Project description

PyPI Version Build Status Doc Status

Limpyd

Limpyd provides an easy way to store objects in Redis, without losing the power and the control of the Redis API, in a limpid way, with just as abstraction as needed.

Featuring:

  • Don’t care about keys, limpyd do it for you

  • Retrieve objects from some of their attributes

  • Retrieve objects collection

  • CRUD abstraction

  • Powerful indexing and filtering

  • Keep the power of all the Redis data types in your own code

Example of configuration:

from limpyd import model

main_database = model.RedisDatabase(
    host="localhost",
    port=6379,
    db=0
)

class Bike(model.RedisModel):

    database = main_database

    name = model.InstanceHashField(indexable=True, unique=True)
    color = model.InstanceHashField()
    wheels = model.StringField(default=2)

So you can use it like this:

>>> mountainbike = Bike(name="mountainbike")
>>> mountainbike.wheels.get()
'2'
>>> mountainbike.wheels.incr()
>>> mountainbike.wheels.get()
'3'
>>> mountainbike.name.set("tricycle")
>>> tricycle = Bike.collection(name="tricycle")[0]
>>> tricycle.wheels.get()
'3'
>>> tricycle.hmset(color="blue")
True
>>> tricycle.hmget('color')
['blue']
>>> tricycle.hmget('color', 'name')
['blue', 'tricycle']
>>> tricycle.color.hget()
'blue'
>>> tricycle.color.hset('yellow')
True
>>> tricycle.hmget('color')
['yellow']

Install

Python versions 2.7 and 3.4 to 3.6 are supported (CPython and PyPy).

Redis-py versions >= 2.9.1 and < 2.11 are supported.

pip install redis-limpyd

Note: Version 1.0, 1.0.1 and 1.1 where broken so removed from PyPI

Documentation

See https://redis-limpyd.readthedocs.io/ for a full documentation

Changelog

See CHANGELOG.rst

Maintainers

Extensions

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

redis-limpyd-1.2.tar.gz (55.2 kB view details)

Uploaded Source

Built Distribution

redis_limpyd-1.2-py2.py3-none-any.whl (62.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file redis-limpyd-1.2.tar.gz.

File metadata

  • Download URL: redis-limpyd-1.2.tar.gz
  • Upload date:
  • Size: 55.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for redis-limpyd-1.2.tar.gz
Algorithm Hash digest
SHA256 5334199929b1b6fea24d33a5e33e04ed5ac59978da73f5f995744cb2305874e5
MD5 f321c275d0a5fad32c92ad6bf072bf03
BLAKE2b-256 2c6f710585d6da5d67e07c4bafadaa03e63410fc885a28d2cd03195a03c9b763

See more details on using hashes here.

File details

Details for the file redis_limpyd-1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for redis_limpyd-1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 7d03a36e871312f6039c27fc4bd2040ac149fae87d5e86f1c546713f2fee13c7
MD5 d29707b0fa85972334eed46a79318da6
BLAKE2b-256 a1afa250f5ba31342538a18fc0e2964e272575465bcb4794113190672abfacc8

See more details on using hashes here.

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