Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Object-hash mapping library for Redis

Project Description

Oredis is a library for storing objects in Redis, a persistent key-value database. It includes an extensible list of validations and has very good performance.

How to use

from oredis.models import Model from oredis.manager import Manager from oredis.fields import String, PrimaryKey, StringPK, Integer, DateTime

class NoteManager(Manager):
pass
class NoteModel(Model):

id = PrimaryKey() title = String() pk_hash = StringPK() body = String(required = True)

objects = NoteManager(connection = redis.Redis())

In [19]: note1 = NoteModel(title = “Hello world!”,
….: body=”I am currently engaged in teaching my brother to program. He is a total beginner, but very smart. (And he actually wants to learn). I’ve noticed that some of our sessions have gotten bogged down in minor details, and I don’t feel I’ve been very organized. (But the answers to this post have helped a lot.)”)

In [20]: note1 Out[20]: <NoteModel: 942>

In [21]: note1.title Out[21]: ‘Hello world!’

In [22]: note1.title

INSTALLATION

To use oredis use pip or easy_install:

pip install oredis

or

easy_install oredis

CONTRIBUTE

Fork https://github.com/lispython/oredis/ , create commit and pull request.

Credits

Thanks Alexander Solovyov for some concepts are taken from orem library.

Release History

Release History

This version
History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
oredis-0.1.tar.gz (9.0 kB) Copy SHA256 Checksum SHA256 Source Sep 11, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting