Skip to main content

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.


Use peewee with Crate:

from peewee import Model, CharField
from crate.peewee import CrateDatabase
from uuid import uuid4

db = CrateDatabase()

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])

Project details

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)

Uploaded source

Built Distribution

crate_peewee-0.1.0-py3-none-any.whl (4.6 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page