Skip to main content

exdrf-gen-al2pd

exdrf-gen-al2pd is an exdrf-gen plugin that generates Pydantic ExModel classes from SQLAlchemy-backed ExDataset metadata (same field partitioning idea as bk-one db2m). Generated modules pair with exdrf-gen-al2r when you want matching FastAPI routers.

Python 3.12.2+ is required.

Generated models per resource

For each ExResource the emitter writes one module (snake-case plural stem, e.g. widgets.py) under the resource’s category path containing:

  • Xxx — label fields (minimum_field_set) plus primary keys.
  • XxxEx(Xxx) — extra scalars and relations (PagedList[Related] / optional nested related label types), with forward refs where needed.
  • XxxCreate — writable create payload: excludes derived columns, depends_on FK scalars, read_only, audit names created_on / updated_on, and the lone PK when is_primary_simple. To-many relations use {rel}_ids (single related PK) or {rel}_keys (list[dict[str, Any]] for composite related PKs).
  • XxxEdit — same payload rules for updates but no primary-key fields. Omitted when the resource is a composite-PK link with only PK scalars (then only XxxCreate is emitted).

The package also writes api.py at the output root with re-exports, and adds __init__.py files so the tree is importable as a package.

Command-line usage

exdrf-gen al2pd DATASET OUT-PATH

Or: python -m exdrf_gen al2pd DATASET OUT-PATH.

  • DATASET — module.path:DeclarativeBase for SQLAlchemy (same as other al2* plugins).
  • OUT-PATH — required unless EXDRF_AL2PD_PATH is set; directory for generated Python modules.

Dependencies

See pyproject.toml: exdrf, exdrf-al, exdrf-gen, exdrf-pd, click, pydantic.

Plugin registration

[project.entry-points.'exdrf.plugins']
exdrf_gen = 'exdrf_gen_al2pd'

See also

  • exdrf-gen-al2r — FastAPI routers that import these schemas.
  • exdrf-gen — README.md.

Metadata

Release files for exdrf-gen-al2pd 0.1.19

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for exdrf-gen-al2pd 0.1.19
File Size Uploaded Provenance Actions
exdrf_gen_al2pd-0.1.19.tar.gz 22.8 kB Without provenance Details for exdrf_gen_al2pd-0.1.19.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for exdrf-gen-al2pd 0.1.19
File Interpreter ABI Platform Actions
exdrf_gen_al2pd-0.1.19-py3-none-any.whl Python 3 none any Details for exdrf_gen_al2pd-0.1.19-py3-none-any.whl

Total release size: 46.6 kB

Release files / exdrf_gen_al2pd-0.1.19.tar.gz

Download URL exdrf_gen_al2pd-0.1.19.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
426f655f16092020f7b29a1b559a9180381fef45681d9e10af3c3f4fe8754013
BLAKE2b-256 checksum
How to use checksums
7b784cb30ec41b720c5c1d02f9559cec81244d3da56b6ba8f2791cc0d7c7e210
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / exdrf_gen_al2pd-0.1.19-py3-none-any.whl

Download URL exdrf_gen_al2pd-0.1.19-py3-none-any.whl
Size 23.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6a84fc253545abec179603c2ae17a48259903157a9ccf38a12d88c75387a0a4
BLAKE2b-256 checksum
How to use checksums
9604e11f49172d77c4d1b55087699a5fa89bb7b5f0258b57b272432aa892190c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for exdrf-gen-al2pd 0.1.19

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page