Pydantic forms
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 here
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.
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 pydantic_forms-2.6.0.tar.gz.
File metadata
- Download URL: pydantic_forms-2.6.0.tar.gz
- Upload date:
- Size: 41.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
23ada2cc04d02c14664d9d51101124be034e62e9b55e6c5ff21c0ee34b0b0bb1
|
|
| MD5 |
214d3d1852516c12c43c8a3a4f9817dc
|
|
| BLAKE2b-256 |
f0be753f1658c50ea70d9e84d8d466891934f4a6e2ee9511c2e6a8e2a05a6307
|
Provenance
The following attestation bundles were made for pydantic_forms-2.6.0.tar.gz:
Publisher:
publish-release.yaml on workfloworchestrator/pydantic-forms
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydantic_forms-2.6.0.tar.gz -
Subject digest:
23ada2cc04d02c14664d9d51101124be034e62e9b55e6c5ff21c0ee34b0b0bb1 - Sigstore transparency entry: 2340519229
- Sigstore integration time:
-
Permalink:
workfloworchestrator/pydantic-forms@27ee42df6064a5c5ae3fd2a37e53aa0bb654374b -
Branch / Tag:
refs/tags/2.6.0 - Owner: https://github.com/workfloworchestrator
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-release.yaml@27ee42df6064a5c5ae3fd2a37e53aa0bb654374b -
Trigger Event:
release
-
Statement type:
File details
Details for the file pydantic_forms-2.6.0-py3-none-any.whl.
File metadata
- Download URL: pydantic_forms-2.6.0-py3-none-any.whl
- Upload date:
- Size: 48.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dcfd64946f78c091cd506fcd922e78b532400bc3a837032d5d3fda6dcddf4c3a
|
|
| MD5 |
732a163e054fac4b5c65e315fcf6833f
|
|
| BLAKE2b-256 |
8c708c7ef6fc7fbd8bd9ecdfee15ec85ff6e047168d3f9c9350b9b5be5ff779a
|
Provenance
The following attestation bundles were made for pydantic_forms-2.6.0-py3-none-any.whl:
Publisher:
publish-release.yaml on workfloworchestrator/pydantic-forms
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydantic_forms-2.6.0-py3-none-any.whl -
Subject digest:
dcfd64946f78c091cd506fcd922e78b532400bc3a837032d5d3fda6dcddf4c3a - Sigstore transparency entry: 2340519241
- Sigstore integration time:
-
Permalink:
workfloworchestrator/pydantic-forms@27ee42df6064a5c5ae3fd2a37e53aa0bb654374b -
Branch / Tag:
refs/tags/2.6.0 - Owner: https://github.com/workfloworchestrator
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-release.yaml@27ee42df6064a5c5ae3fd2a37e53aa0bb654374b -
Trigger Event:
release
-
Statement type: