{"id":23181,"library":"types-wtforms","title":"types-wtforms","description":"Typing stubs for WTForms, providing type hints for the WTForms library. Current version: 3.2.1.20260408. Release cadence tracks CPython typeshed updates.","status":"active","version":"3.2.1.20260408","language":"python","source_language":"en","source_url":"https://github.com/python/typeshed","tags":["typing-stubs","wtforms","type-hints","typeshed"],"install":[{"cmd":"pip install types-wtforms","lang":"bash","label":"install types-wtforms"}],"dependencies":[{"reason":"Stubs are type hints for WTForms; runtime depends on actual WTForms.","package":"WTForms","optional":false},{"reason":"Often used together for type checking.","package":"mypy","optional":true},{"reason":"Alternative type checker.","package":"pyright","optional":true}],"imports":[{"note":"","wrong":"","symbol":"Form","correct":"from wtforms import Form"},{"note":"","wrong":"","symbol":"StringField","correct":"from wtforms import StringField"},{"note":"","wrong":"","symbol":"validators","correct":"import wtforms.validators as validators"}],"quickstart":{"code":"from wtforms import Form, StringField, validators\n\nclass MyForm(Form):\n    name = StringField('Name', [validators.DataRequired()])\n\nform = MyForm(name='test')\nprint(form.name.data)","lang":"python","description":"Basic form definition using WTForms stubs."},"warnings":[{"fix":"pip install wtforms types-wtforms","message":"types-wtforms only provides stubs for type checking; you must also install wtforms for runtime.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure wtforms version matches the stub major.minor version.","message":"Stubs may be incomplete or have mismatched versions. The stub version (3.2.1.20260408) corresponds to WTForms version 3.2.1.","severity":"gotcha","affected_versions":">=3.2.1"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install wtforms","cause":"Missing runtime WTForms installation; stubs alone do not provide runtime attributes.","error":"Module 'wtforms' has no attribute 'Form'"},{"fix":"Use 'from wtforms import validators' or 'import wtforms.validators' depending on context.","cause":"Typeshed stubs may not cover all submodules; ensure correct import path.","error":"Import 'wtforms.validators' could not be resolved"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}