Skip to main content

Pydantic forms

pypi_version Supported python versions Downloads codecov

A Python package that lets you add smart forms to FastAPI and Flask. Forms will respond with a JSON scheme that contains all info needed in a React frontend with uniforms to render the forms and handle all validation tasks.

Forms can also consist out of a wizard, so you can create complex form flows consisting out of multiple consecutive forms. The forms and the validation logic are defined by using Pydantic models.

Documentation regarding the usage of Forms can be found at workfloworchestrator.org/pydantic-forms.

Installation (Development standalone)

This project uses uv. Install the project and its dependencies to develop on the code:

uv sync --all-extras

This creates a .venv, installs pydantic-forms in editable mode, and installs the dev dependency group (which chains in test and doc) plus the fastapi and orjson extras. There is no need to create or activate a virtualenv yourself -- prefix commands with uv run and uv will use the right interpreter.

Running tests

Run the unit-test suite to verify a correct setup.

uv run pytest tests/unit_tests

or with xdist:

uv run pytest -n auto tests/unit_tests

If you do not encounter any failures in the test, you should be able to develop features in the pydantic-forms.

Installation (Development version used by a project that depends on pydantic-forms)

If you are working on a project that already uses pydantic-forms and you want to test your new form features against it, point that project at your local checkout. Run this from the other project:

uv add --editable /path/to/pydantic-forms

This replaces the PyPI dependency with an editable install of your working copy and records it under [tool.uv.sources] in that project's pyproject.toml. Undo it with:

uv remove pydantic-forms && uv add pydantic-forms

Increasing the version number for a (pre) release.

When your PR is accepted you will get a version number.

You can do the necessary change with a clean, e.g. every change committed, branch:

uv version 0.0.1

Note: specifying the version explicitly, instead of relying on uv version --bump patch to increase it, allows you to set a "RC1" version if needed -- e.g. uv version 0.0.1rc1.

Debugging Form behaviour

If you want/need the traceback of pydantic in a Form response you can add an env variable:

LOG_LEVEL_PYDANTIC_FORMS=DEBUG

This will add the traceback to the JSONResponse. If the loglevel is set to DEBUG the library will also add the traceback to the logger.

Metadata

Release files for pydantic-forms 2.7.0

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

Source distribution (sdist)

Source distribution for pydantic-forms 2.7.0
File Size Uploaded
pydantic_forms-2.7.0.tar.gz 48.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pydantic-forms 2.7.0
File Interpreter ABI Platform
pydantic_forms-2.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 101.2 kB

Release files / pydantic_forms-2.7.0.tar.gz

Download URL pydantic_forms-2.7.0.tar.gz
Size 48.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a24499bb3e18ecfa98892bef57889cef81dc90439cde1c2054493022bf9272d4
BLAKE2b-256 checksum
How to use checksums
971b6f5cf0c4ed8e93fa4bb5fd7c6126295d17332bd157a5d1f6e83b431c0c36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / pydantic_forms-2.7.0-py3-none-any.whl

Download URL pydantic_forms-2.7.0-py3-none-any.whl
Size 52.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
509e71ae35f0685d43aa69696049eab08bd61fedb16a255ba536961026987956
BLAKE2b-256 checksum
How to use checksums
a8f8afdc2c4d51fc41dc3ff639dfb34e84b9a7e0baf7f2bc7eeffbe77acb7a72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log
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