skip to navigation
skip to content

Solution 1.1.10

Implements an easy-to-use bridge to SQLAlchemy

Latest Version: 5.4.0


from solution 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,

to_do = ToDo(title='Install Solution', done=True)

completed = db.query(ToDo).filter(ToDo.done == True).all()

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

  • first_or_notfound
  • get_or_notfound
  • to_json
File Type Py Version Uploaded on Size
Solution-1.1.10.tar.gz (md5) Source 2012-06-18 143KB