A networked standard template library and ORM for python
Project description
A networked standard template library for python.
The data is owned by different, configurable back-end databases and it is accessed using a light-weight Object Relational Mapping (ORM) inspired by Django. The source code is hosted at google code while Documentation and Downloads are available via PyPi.
Backends
Backend databases provide the backbone of the library, while the Object Relational Mapping is the syntactic sugar. Currently the list of back-ends is limited to
Local memory (planned). For testing purposes.
CouchDB (planned). Requires couchdb-python.
Memcached (maybe)
Only Redis is fully operational.
Object-relational mapping
The module stdnet.orm is a lightweight ORM. For example:
from stdnet import orm class Author(orm.StdModel): name = orm.AtomField() class Book(orm.StdModel): author = orm.ForeignKey(Author) title = orm.AtomField()
Register models with backend:
orm.register(Author,'redis://localhost/?db=1') orm.register(Book,'redis://localhost/?db=2')
Installing and Running
To install:
python setup.py install pip install python-stdnet easy_install python-stdnet
At the moment, only redis back-end is available, so to run tests you need to install redis. Once done that, launch redis and type:
python test.py
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.