1.4.1
Project description
A simple, flexible and testable active-record powered by SQLAlchemy.
Install
pip install chemist
Documentation
Basic Usage
from chemist import (
Model, db, MetaData,
get_or_create_engine,
)
metadata = MetaData()
engine = get_or_create_engine('sqlite:///example.db')
class BlogPost(Model):
table = db.Table('blog_post',metadata,
db.Column('id', db.Integer, primary_key=True),
db.Column('title', db.Unicode(200), nullable=False),
db.Column('content', db.UnicodeText, nullable=False),
)
post1 = BlogPost.create(title='Hello World', content='\n'.join([
'Introduction...',
'Supporting Theory 1...',
'Supporting Theory 2...',
'Supporting Theory 3...',
'Conclusion',
]))
for post in BlogPost.all():
print(post.title, post.id)
Examples
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
chemist-1.4.1.tar.gz
(12.1 kB
view details)
File details
Details for the file chemist-1.4.1.tar.gz.
File metadata
- Download URL: chemist-1.4.1.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.14.2 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3032141b9836def9d3d4a40f2a50e8f49d51f7bb016465f939fc61dc49549f79
|
|
| MD5 |
f0a6a69b904aab7dcca02fa0ee53a6ed
|
|
| BLAKE2b-256 |
7312fed857b5763dd96606c65acd3e1dcc7d2d3c83484a100a88d227f0cceae8
|