dorm
A small SQLite ORM for Python 3. You probably shouldn't use this, but if you want to anyway, pip install dorm
and look at the tests for how to do so.
Migrations
Dorm has the most basic migration support imaginable:
# Generates a schema migration if it detects any changes.
python -m dorm --db=books.db --models=project.models --migrations=project.migrations generate
# Migrates to the latest migration (sorted by filename in the --migrations module).
python -m dorm --db=books.db --models=project.models --migrations=project.migrations migrate
Existing migrations are run automatically when calling dorm.setup with the migrations argument set. This
is to ensure a good first-run experience and automatic upgrades for end users. If migrations is not set,
any detected schema changes will be applied automatically to the database.
Asynchronous Tables
Dorm can be used with asyncio by simply subclassing AsyncTable instead of Table. The insert class method,
and save and refresh instance methods become coroutines in that case. Also, the query class method will return
an AsyncQuery instance, with coroutines for count, values, get, update, and iteration via __aiter__
(i.e. async for obj in MyTable.query()).
Migrations and introspection still happen synchronously, since they tend not to happen during times where they would benefit from being asyncronous.
Metadata
Release files for dorm 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dorm-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for dorm-0.4.0-py3-none-any.whl |
Release files / dorm-0.4.0-py3-none-any.whl
| Download URL | dorm-0.4.0-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
edbb10c6ce79cbff85a87b5829dc4e985c05db0a27391913ea9e50c7af111c53
|
|
BLAKE2b-256 checksum How to use checksums |
01ee9bd19729eb46f8ce1230c6787ac7ce782faaea8919e184e72a232dca934a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.2
|
Security for dorm 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.