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.2.0.tar.gz (26.5 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.2.0-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coralillo-2.2.0.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

Hashes for coralillo-2.2.0.tar.gz
Algorithm Hash digest
SHA256 a7fbd8a74e4f9dc250b3c73233f2b7e78dbad8aadaf51f08115b95f7894889d1
MD5 99525388e81c3e2b7fe897513c39c667
BLAKE2b-256 ccaf77a81bdff55dd1e03398e27a00ff7e7f4253a9d033b730ea0325a049ac17

See more details on using hashes here.

File details

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

File metadata

  • Download URL: coralillo-2.2.0-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

Hashes for coralillo-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca0c558b38a2e94afdb7b72b91993378b340793c21f859ca7a0931ad7b6a7e66
MD5 34de37281621b69626cd247b5bd6cff3
BLAKE2b-256 5d66f1b8106f41b6c3093ce2680000b15b39cb7f11d85fef06844ede3883a727

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