coralillo-2.2.1
توضیحات
An Object-Redis Mapping
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | coralillo-2.2.1 |
| نام | coralillo |
| نسخه کتابخانه | 2.2.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Abraham Toriz Cruz |
| ایمیل نویسنده | categulario@gmail.com |
| آدرس صفحه اصلی | https://categulario.gitlab.io/coralillo/ |
| آدرس اینترنتی | https://pypi.org/project/coralillo/ |
| مجوز | MIT |
Coralillo
=========
.. image:: https://travis-ci.org/getfleety/coralillo.svg?branch=master
:target: https://travis-ci.org/getfleety/coralillo
:alt: Build Status
A redis ORM.
Notes
-----
Version 1.0 depends on redis >= 3.0.
Installation
------------
.. code-block:: bash
$ pip install coralillo
Usage
-----
.. code:: python
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()
نیازمندی
| مقدار | نام |
|---|---|
| >=3 | redis |
| - | bcrypt |
| - | check-manifest |
نحوه نصب
نصب پکیج whl coralillo-2.2.1:
pip install coralillo-2.2.1.whl
نصب پکیج tar.gz coralillo-2.2.1:
pip install coralillo-2.2.1.tar.gz