FormEncode
"HTML form validation, generation, and conversion package"
What it is and what it does
FormEncode is a validation and form generation library that has been in production use since 2005. It decouples validation logic from HTTP or other input mechanisms, allowing you to validate nested, compound data structures independently. The validation engine can be used on its own without the form generation features, making it flexible for different architectural needs.
The package supports current Python versions (3.7 through 3.13) and runs on both CPython and PyPy. It has no external runtime dependencies, making installation straightforward. However, the project is dormant—no active development for 560 days—so while it is stable and marked Production/Stable, new features and fixes are not being added.
Use it for:
- Validate form submissions in web frameworks by applying schema rules to nested request data independently of HTTP handling.
- Build HTML form markup programmatically with validation rules embedded, then reuse the same rules for server-side validation.
- Validate complex nested data structures (lists, dicts) in configuration files or API payloads without coupling to a web framework.
- Implement custom validation pipelines for compound data where standard validators need to be composed and nested.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
FormEncode validates and generates HTML forms, with validation logic that works independently on nested compound data structures regardless of input source.
Yes, if you need form validation and generation in a stable, dependency-free package and can work with dormant maintenance. The lack of recent updates is acceptable for mature, well-tested code with no known vulnerabilities, but unsuitable if you expect active support or compatibility fixes for emerging Python ecosystem changes.
Install
formencode on PyPI
pip
pip install formencodeuv
uv add formencodepoetry
poetry add formencodeInstalling FormEncode
Before you install
Low install friction with no runtime dependencies. Dormant maintenance status (560 days since last release) means no active development, though the package is marked Production/Stable and supports current Python versions through 3.13.
License in practice
MIT license is permissive, allowing use in commercial and proprietary projects with minimal restrictions beyond attribution.
Quickstart
pip install FormEncode
from formencode import validators
schema = validators.String(not_empty=True)
result = schema.to_python('example')
Verify before relying
- Whether the package's form generation output remains compatible with modern HTML/CSS frameworks and practices.
- Whether dormant status means security issues would be addressed if discovered.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 560 days since the last release |
| First released | |
| Downloads | 295,796/month — #7,914 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: FormEncode-2.1.1-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
django-formtoolsdjango-formtools provides high-level form…
permissive · top 5,000 on PyPI
email-validatorValidates email address syntax and optionally…
permissive · top 1,000 on PyPI
google-i18n-addressValidates, normalizes, and formats postal…
permissive · top 15,000 on PyPI
django-enumfieldsProvides Django model fields that store Python…
permissive · top 15,000 on PyPI
nestedtextNestedText is a human-friendly file format for…
permissive · top 15,000 on PyPI
essential-generatorsGenerates realistic fake data (emails, URLs,…
permissive · top 15,000 on PyPI
WTFormsWTForms provides form validation, rendering,…
permissive · top 5,000 on PyPI
htbuilderhtbuilder lets you construct HTML strings using…
permissive · top 15,000 on PyPI
jsoncompatChecks whether evolving JSON Schemas remain…
unclear · top 15,000 on PyPI