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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crate-peewee-0.1.0.tar.gz.
File metadata
- Download URL: crate-peewee-0.1.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2afd8e7870a3c0f367580c576720f4d16e53f29c92f6f61cdfcb557f14b819f
|
|
| MD5 |
b0c2493c54b4a2c975444cba6eaf2e90
|
|
| BLAKE2b-256 |
991fae660211093af9d836acd8af57adfb5c2b785f6219b99c9bee47ba44ece8
|
File details
Details for the file crate_peewee-0.1.0-py3-none-any.whl.
File metadata
- Download URL: crate_peewee-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
367e55d380988d1b43564f0eef8450a25e73b1d7f61069d9072fc8038b492033
|
|
| MD5 |
646ca166cf93c3aba7db4139d094cc99
|
|
| BLAKE2b-256 |
37cd5fcc70aab374292ecf16c74905506957631b73749391866478fad297c7a3
|