API reference
Every public name of the adorm package. A name is public when adorm.__all__ lists it; other names are internal and may change without notice.
Package
adorm.__version__
The installed version as a string, read from the package metadata.
python
import adorm
print(adorm.__version__) # "0.0.1"Sections
Reference pages are grouped as in the Django documentation:
| Group | Covers |
|---|---|
| QuerySet API | QuerySet methods, terminal coroutines, iteration |
| Query | the immutable query description (adorm.query.Query) |
| Operations | the reads and writes a driver executes (adorm.operations) |
| Operation encoding | model schemas and the JSON encoding of operations (adorm.schema, adorm.codec) |
| Lookups | field lookups (exact, icontains, in, …) and relation traversal |
| Expressions, functions and aggregates | F, Value, Q, Func and its functions, aggregates, Case, Subquery |
| Model API | Model, ModelMeta, relation descriptors, Manager and driver_method, the model registry |
| Sessions | create_session, current_session, Session, BoundModel, the runner (adorm.executor) |
| Pool and router | Pool, Router, slots, leases and their request queues and event channels, held slots (adorm.executor) |
| Transactions | atomic, Atomic, on_commit, the active transactions of a context (adorm.executor) |
| Connection options and timeouts | connection_options, timeout, Timeout, the layers of options (adorm.executor.options) |
| Schema checks | check_schema, SchemaProblem, adorm check-schema (adorm.checks) |
| Exceptions | the exception hierarchy |
| Settings | configure, connection profiles, pool settings, run-time profiles (adorm.settings), the ADORM setting and the Django app (adorm.contrib.django) |
| Drivers | the driver contract (adorm.drivers), the Django driver and its query translation (adorm.drivers.django, adorm.drivers.django.translation), the native PostgreSQL driver (adorm.drivers.asyncpg, its writes in adorm.drivers.asyncpg.writes), SQL statements (adorm.drivers.sql), Django's compiler for asyncpg (adorm.drivers.asyncpg.compiler) |
| Events | event types, their encoded form, the client's event channel and dispatch (adorm.events) |
| Model generator | adorm generate, the model description, rendering and files, expose and client_base (adorm.codegen, adorm.cli, adorm.porting) |
| Testing | waiting until an operation is in the database or waits for a lock (wait_for_operation, wait_for_lock, running_operations); test mode under Django's TestCase and TransactionTestCase (adorm.testing.django) |