Please note: this project is inactive since early 2006



Home
Features

Quick example

Project's status
Contributors

Installation

Documentation
    User's Guide (pdf)

Framework APIs
    Modeling
    Notification

Downloads

SF Project Page
     Mailing list
     News
     Bugs
     Web SVN

Licence

Modeling
Object-Relational Bridge for python

Sébastien Bigaret

Features

The framework allows you to transparently create, retrieve, update or delete python objects from a database without having to write a single line of SQL. It achieves this by offering you a container, the EditingContext (see the User's Guide) that is responsible for your objects.

Additionally the framework offers:

  • A comprehensive model description language to specify how the object model is to map to a relational model, either pure python (PyModels) or XML.

  • Functional tools to help you designing your model (in the form of either a Zope poduct, or a collection of standalone utility scripts), that can also validate your models against the most common errors made when designing a model.

  • Generation of database schemas (including: primary keys, foreign keys, referential constraints),

  • Generation of python code templates ready to be used1

  • Support for transparent mapping of (class) inheritance in relational databases.

  • A simple and powerful object-oriented query langage.

  • Once you get one or more objects, using that query langage, you do not need to explicitly fetch the objects in relations to the ones you already fetched. Rather, you simply use normal python getters to traverse relationships, and the related objects are automatically fetched, when needed and when appropriate. It helps you keep the memory footprint of your applications reasonable, while keeping you away from the SQL world.

  • Automatic checking for referential-integrity constraints, plus the framework provides a unified place where to put your own validation logic (objects' invariants, ...) so that they are integrated in the checked constraints.

  • Automatically encloses all modifications made to a graph/set of objects in a transactional scheme, so that the changes are all saved, or none are saved.

  • Support for nested graphs/sets of objects.

  • Works with python 2.1, 2.2, 2.3 and 2.4

Supported RDBMS

MySQL
tested with v3.x and v4.0.24

Supported python adaptor: MySQL

Oracle
tested with Oracle 8i (linux/8.1.7.0.1) and Oracle 9i (9.2.0.1.0/linux)

Supported python adaptor: DCOracle2

Postgresql
versions 7.2 and 7.3 (see Postgresql specificities in the User's Guide if you're using v7.3).

Supported python adaptors: psycopg or PyGreSQL(pgdb) or PyPgSQL

SQLite
tested with v2.8.17 and v3.3.

Supported python adaptor: PySQLite

Hosted by: SourceForge.net Logo

Footnotes

... used1
Note that code generation is not the only way to go, and is only provided so that one can easily bootstrap modules/classes based on a model. Python classes and modules can be dynamically built from a model at runtime; if you're interested in such a feature, you want to have a look at this patch for details.


Sébastien Bigaret 2006-03-04