Solution 2.6.1

Makes SQLAlchemy easy and fun to use, and adds some custom capabilities

  Add it to your Download Basket!

 Add it to your Watch List!

0/5

Rate it!
send us
an update
LICENSE TYPE:
MIT/X Consortium License 
USER RATING:
UNRATED
  0.0/5
DEVELOPED BY:
Juan-Pablo Scaletti
HOMEPAGE:
github.com
CATEGORY:
ROOT \ Internet \ HTTP (WWW)
Solution is a Python module that makes SQLAlchemy easy and fun to use, and adds some custom capabilities

Example:

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,
 default=datetime.utcnow)

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

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

Last updated on September 16th, 2012

requirements

#SQLAlchemy capabilities #Python module #SQLAlchemy #custom #capabilities #Python

Add your review!

SUBMIT