A networked standard template library for Python.
Project description
- Documentation:
- Dowloads:
- Source:
- Keywords:
server, database, cache, redis, orm
–
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
To install, download, uncompress and type:
python setup.py install
otherwise use easy_install:
easy_install python-stdnet
or pip:
pip install python-stdnet
Running Tests
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:
>>> import stdnet >>> stdnet.runtests()
otherwise from the package directory:
python runtests.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.