types-wtforms

raw JSON →
3.2.1.20260408 verified Fri May 01 auth: no python

Typing stubs for WTForms, providing type hints for the WTForms library. Current version: 3.2.1.20260408. Release cadence tracks CPython typeshed updates.

pip install types-wtforms
error Module 'wtforms' has no attribute 'Form'
cause Missing runtime WTForms installation; stubs alone do not provide runtime attributes.
fix
pip install wtforms
error Import 'wtforms.validators' could not be resolved
cause Typeshed stubs may not cover all submodules; ensure correct import path.
fix
Use 'from wtforms import validators' or 'import wtforms.validators' depending on context.
gotcha types-wtforms only provides stubs for type checking; you must also install wtforms for runtime.
fix pip install wtforms types-wtforms
gotcha Stubs may be incomplete or have mismatched versions. The stub version (3.2.1.20260408) corresponds to WTForms version 3.2.1.
fix Ensure wtforms version matches the stub major.minor version.

Basic form definition using WTForms stubs.

from wtforms import Form, StringField, validators

class MyForm(Form):
    name = StringField('Name', [validators.DataRequired()])

form = MyForm(name='test')
print(form.name.data)