Skip to main content

An Object-Redis Mapping

Project description

Build Status

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


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.1.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coralillo-2.0.1-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

Details for the file coralillo-2.0.1.tar.gz.

File metadata

  • Download URL: coralillo-2.0.1.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.1

File hashes

Hashes for coralillo-2.0.1.tar.gz
Algorithm Hash digest
SHA256 e047f8119a7a08f594251bb44dc34625d0939bfcfd89cc522134b66ec1697ff0
MD5 ec63e1e6d871d53152f33b47f20c3b37
BLAKE2b-256 25ad859134a313ee6ffc38e5d8d7097c5a885ba0f8b1ceddbfbfeb78c411c58a

See more details on using hashes here.

File details

Details for the file coralillo-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: coralillo-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 31.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.1

File hashes

Hashes for coralillo-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 915432617d53b69b83e259b511a8a390cf7c852119e38373c2140b5ae7c6734d
MD5 d80299948fa4a6c03748e686849bcf9a
BLAKE2b-256 a2d3011e27e7fecdb21f76b18b0f8e28a2bdf17facb44705289fe972a1872ddb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page