Skip to content

A flexible forms validation and rendering library for Python.

License

Notifications You must be signed in to change notification settings

pallets-eco/wtforms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

310c0b3 · Jan 2, 2025
Oct 20, 2024
Oct 18, 2024
Nov 13, 2024
Oct 11, 2024
Apr 22, 2020
Oct 11, 2024
Jan 2, 2025
Oct 21, 2024
Apr 21, 2020
Apr 22, 2020
Oct 22, 2024
Sep 29, 2023
Oct 11, 2024
Oct 20, 2024

WTForms

WTForms is a flexible forms validation and rendering library for Python web development. It can work with whatever web framework and template engine you choose. It supports data validation, CSRF protection, internationalization (I18N), and more. There are various community libraries that provide closer integration with popular frameworks.

Installation

Install and update using pip:

pip install -U WTForms

Third-Party Library Integrations

WTForms is designed to work with any web framework and template engine. There are a number of community-provided libraries that make integrating with frameworks even better.

  • Flask-WTF integrates with the Flask framework. It can automatically load data from the request, uses Flask-Babel to translate based on user-selected locale, provides full-application CSRF, and more.
  • WTForms-Alchemy provides rich support for generating forms from SQLAlchemy models, including an expanded set of fields and validators.
  • WTForms-SQLAlchemy provides ORM-backed fields and form generation from SQLAlchemy models.
  • WTForms-Bootstrap5 provides Bootstrap 5 favor renderer with great customizability.
  • Starlette-WTF integrates with Starlette and the FastAPI framework, based on the features of Flask-WTF.
  • Bootstrap-Flask Bootstrap-Flask is a collection of Jinja macros for Bootstrap 4 & 5 and Flask using Flask-WTF.

Links