Skip to main content

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.5 to 3.8 are supported (CPython and PyPy).

Redis-py versions >= 3 are supported, with redis-server versions >= 3.

pip install redis-limpyd

For Redis-py versions < 3, please use limpyd version 1.3.1 (or later in 1.x versions)

Documentation

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

Changelog

See CHANGELOG.rst

Maintainers

Extensions

Release files for redis-limpyd 2

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

Source distribution (sdist)

Source distribution for redis-limpyd 2
File Size Uploaded
redis-limpyd-2.tar.gz 56.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for redis-limpyd 2
File Interpreter ABI Platform
redis_limpyd-2-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 117.7 kB

Release files / redis-limpyd-2.tar.gz

Download URL redis-limpyd-2.tar.gz
Size 56.4 kB
Tags Source
SHA-256 checksum
How to use checksums
50f52cf2d04ed372f045a91d77de8a46c723bfe40be7f01cf8011a7da9b2d16c
BLAKE2b-256 checksum
How to use checksums
e38d724f016e19d26af1c76a8d29a472420ff814ee5b16954a74b207e85aec41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.2

Release files / redis_limpyd-2-py2.py3-none-any.whl

Download URL redis_limpyd-2-py2.py3-none-any.whl
Size 61.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
822005b027cc4782b19e924d985daa61609965efb29e8d4dffc1ae86e8a98e64
BLAKE2b-256 checksum
How to use checksums
4f68a9d6ec1d9ee2a2a87fe4709b63efdc5ef399acd260753cbb4dccf625f5bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.2
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