Skip to main content

An easy-to-use and framework-independent light wrapper for SQLAlchemy

Project description

A framework-independent wrapper for SQLAlchemy that makes it really easy and fun to use.

Example:

from orm import SQLALchemy

db = SQLALchemy('postgresql://scott:tiger@localhost:5432/mydatabase')

class ToDo(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    title = db.Column(db.String(60), nullable=False)
    done = db.Column(db.Boolean, nullable=False, default=False)
    pub_date = db.Column(db.DateTime, nullable=False,
        default=datetime.utcnow)

to_do = ToDo(title='Install orm', done=True)
db.add(to_do)
db.commit()

completed = db.query(ToDo).order_by(Todo.pub_date.desc()).all()

It does an automatic table naming (if no name is defined) and, to the base query class.

Project details


Release history Release notifications

History Node

1.1.0

History Node

1.0.4

History Node

1.0.3

History Node

1.0.2

This version
History Node

1.0.1

History Node

1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
ORM-1.0.1.tar.gz (129.4 kB) Copy SHA256 hash SHA256 Source None Jun 16, 2013

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page