Skip to main content

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

  • ExModel subclasses 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 under exdrf_pd) for building an ExDataset from 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 / XxxEdit from 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 ExModel classes.

Install exdrf-gen and the plugin you need; see exdrf-gen README for the plugin entry-point pattern.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

exdrf_pd-0.1.18.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exdrf_pd-0.1.18-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file exdrf_pd-0.1.18.tar.gz.

File metadata

  • Download URL: exdrf_pd-0.1.18.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

Hashes for exdrf_pd-0.1.18.tar.gz
Algorithm Hash digest
SHA256 522d93f99028c004d4d30ed4373ee3a457515768210e1619fa3bb456e9e9a6c6
MD5 36d9f3bffb04fc27b5ba577e351fd4db
BLAKE2b-256 ac1012ae54b899d07ee0b683f475ceda7a2f1a7224d8c72aa9476e1b509d39c8

See more details on using hashes here.

File details

Details for the file exdrf_pd-0.1.18-py3-none-any.whl.

File metadata

  • Download URL: exdrf_pd-0.1.18-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

Hashes for exdrf_pd-0.1.18-py3-none-any.whl
Algorithm Hash digest
SHA256 b55d6e2146015c2501a678243b564bb37dd503cadec0db61bf5094319135ab6b
MD5 e1a9aea27b7b7cfe6f40ca0707aa3a41
BLAKE2b-256 bc8de5a0e4d0c6a30aba52575b9e2931d8c10de7214d6ab5673b4215766f165b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page