An Object-Redis Mapping
Project description
A redis ORM.
Notes
Version 1.0 depends on redis >= 3.0.
Installation
$ pip install coralillo
Usage
from coralillo import Engine, Model, fields
# Create the engine
eng = Engine()
# Declare your models
class User(Model):
name = fields.Text()
last_name = fields.Text()
email = fields.Text(
index=True,
regex='^[\w.%+-]+@[\w.-]+\.[a-zA-Z]{2,}$',
)
class Meta:
engine = eng
# Persist objects to database
john = User(
name='John',
last_name='Doe',
email='john@example.com',
).save()
# Query by index
mary = User.get_by('email', 'mary@example.com')
# Retrieve all objects
users = User.all()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
coralillo-2.0.2.tar.gz
(25.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
coralillo-2.0.2-py3-none-any.whl
(31.4 kB
view details)
File details
Details for the file coralillo-2.0.2.tar.gz.
File metadata
- Download URL: coralillo-2.0.2.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5816df06cb786efe4ad24c5927cd51a44fd98218b4073a6b611ffcb738a98694
|
|
| MD5 |
86544b7339d70cfe1df7c882adeaf485
|
|
| BLAKE2b-256 |
1a977d7475310f54c9b622cfc584ce3487d600494815e09f3a14a45e7aa965ef
|
File details
Details for the file coralillo-2.0.2-py3-none-any.whl.
File metadata
- Download URL: coralillo-2.0.2-py3-none-any.whl
- Upload date:
- Size: 31.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c790e6bb65f4253c5056ab31c0457db0b43b11723241f6f76c32edd56dbd8dcc
|
|
| MD5 |
cf4816944c7432dc36fd1fa3b748cdf1
|
|
| BLAKE2b-256 |
a2d6cb4580c6d81f179e4a85d695e4f6a646de738a6d1e3e0e68107c3ff07ed6
|