Use Pydantic with Ex-DRF.
Project description
Pydantic support for Ex-DRF
exdrf-pd connects Pydantic v2 models to the exdrf dataset tree. It
is the usual path for HTTP APIs and validators that prefer BaseModel over
SQLAlchemy declarative classes.
What it provides
ExModelsubclasses and visitors that expose resources and fields in the same shapes exdrf uses elsewhere, so codegen and tooling can treat ORM and Pydantic sources uniformly where supported.dataset_from_pydantic(and related imports underexdrf_pd) for building anExDatasetfrom your model modules—used by plugins such as exdrf-gen-pd2dare.
Dependencies
exdrf and pydantic (see pyproject.toml). Python 3.12.2+ is
required.
Related packages
- exdrf-gen-al2pd — emits Pydantic
Xxx/XxxEx/XxxCreate/XxxEditfrom SQLAlchemy metadata (often paired with exdrf-gen-al2r). - exdrf-ts — maps field types and Python annotations to TypeScript for DARE and other TS emitters; depends on exdrf-pd.
- exdrf-gen-pd2dare — generates DARE TypeScript from
ExModelclasses.
Install exdrf-gen and the plugin you need; see exdrf-gen README for
the plugin entry-point pattern.
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 exdrf_pd-0.1.17.tar.gz.
File metadata
- Download URL: exdrf_pd-0.1.17.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acf89e7b80ad6563f886197e1f7d197459edb8bcf3a891b35cc475820cc8f3f5
|
|
| MD5 |
fcaafa45c691b12424e65536d8110b4b
|
|
| BLAKE2b-256 |
593265fd5f796c5fc7a6da0d707572ba0f6e87626b8144b46859b2242a0d02e7
|
File details
Details for the file exdrf_pd-0.1.17-py3-none-any.whl.
File metadata
- Download URL: exdrf_pd-0.1.17-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1579522562581fa3fa7b3e9ac56b7f3247eeb5efbf05041902527ad5351197a1
|
|
| MD5 |
ea059bd8ab964ff868d7c5f412c0dede
|
|
| BLAKE2b-256 |
b66b76ce773ac756e63981f191199d905c518280caa9a5620f2196ebda57f752
|