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.2.1.tar.gz
(26.5 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.2.1-py3-none-any.whl
(32.3 kB
view details)
File details
Details for the file coralillo-2.2.1.tar.gz.
File metadata
- Download URL: coralillo-2.2.1.tar.gz
- Upload date:
- Size: 26.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d2a6116f3dabb34b668178e6d47ad7857a3c520ab60f50ac1fa0b53534bba49
|
|
| MD5 |
7ec0a65499ee2ea0876c78fbea5875c0
|
|
| BLAKE2b-256 |
f64fe7be53deb4f4e0410e0d4a2960416e4c4e73975c4b183e9fd614a267ff0f
|
File details
Details for the file coralillo-2.2.1-py3-none-any.whl.
File metadata
- Download URL: coralillo-2.2.1-py3-none-any.whl
- Upload date:
- Size: 32.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34744cc83d72c3bd06beef1d19e3d1d6b127d42bcd32249b7a46e6f59440a4ee
|
|
| MD5 |
10c2464cb9d84c6145d1176dfce25f69
|
|
| BLAKE2b-256 |
04623260b8abf7b8c93a586e85c8f5501b74f89253e1dea82b28405e40facf3a
|