Makes SQLAlchemy easy and fun to use, and adds some custom capabilities.
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
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
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.
Source Distribution
Solution-1.1.0.tar.gz
(130.2 kB
view details)
File details
Details for the file Solution-1.1.0.tar.gz.
File metadata
- Download URL: Solution-1.1.0.tar.gz
- Upload date:
- Size: 130.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a21e99ea2add11e2a99a3fef30630fdfcd0776f26ba4e8e9d82bb6355e3c7ded
|
|
| MD5 |
b6a16a58383db33d912f5e4104ad3fd9
|
|
| BLAKE2b-256 |
2f4ed6c8213faa9f5a6914ede3033000954944733ad69450febe51c89b55af26
|