skillfed

FormEncode

"HTML form validation, generation, and conversion package"

formencode v2.1.1 295.8K downloads/30d#7,914 on PyPI
Permissive license MIT DORMANT released

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 formencode

uv

uv add formencode

poetry

poetry add formencode

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules

Tags

form validation libraryhtml form generationnested data validationform field validationhtml form builderdata structure validationform input validation
form-validationhtml-generationdata-validation

More Python Modules packages