Crate driver for peewee
Project description
Crate driver for peewee, a small, expressive ORM.
Most basic operations work. Support for special Crate features like fulltext search or object and array fields is still a work in progress.
For a full documentation take a look at the peewee documentation.
Usage
Use peewee with Crate:
from peewee import Model, CharField from crate.peewee import CrateDatabase from uuid import uuid4 db = CrateDatabase() db.connect() def gen_key(): return str(uuid4()) class User(Model): id = CharField(null=True, default=gen_key, primary_key=True) name = CharField(null=True) class Meta: database = db db.create_tables([User], safe=True) arthur = User.create(name='Arthur') db.execute_sql('refresh table user') print([u for u in User.select(User.name).tuples()])
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
crate-peewee-0.1.0.tar.gz
(7.7 kB
view hashes)
Built Distribution
Close
Hashes for crate_peewee-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 367e55d380988d1b43564f0eef8450a25e73b1d7f61069d9072fc8038b492033 |
|
MD5 | 646ca166cf93c3aba7db4139d094cc99 |
|
BLAKE2b-256 | 37cd5fcc70aab374292ecf16c74905506957631b73749391866478fad297c7a3 |