{"id":13501807,"url":"https://github.com/brutus/wtforms-html5","last_synced_at":"2026-03-17T22:05:34.827Z","repository":{"id":5435449,"uuid":"6628008","full_name":"brutus/wtforms-html5","owner":"brutus","description":"HTML5 widgets for WTForms","archived":false,"fork":false,"pushed_at":"2026-03-16T19:08:58.000Z","size":194,"stargazers_count":26,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-03-17T06:02:40.587Z","etag":null,"topics":["forms","html5","library","python","wtforms"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brutus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2012-11-10T13:52:30.000Z","updated_at":"2025-02-13T13:38:06.000Z","dependencies_parsed_at":"2024-06-12T02:18:16.914Z","dependency_job_id":"1ff47c30-fde5-481a-b947-38eb1a3f4a0f","html_url":"https://github.com/brutus/wtforms-html5","commit_stats":{"total_commits":198,"total_committers":6,"mean_commits":33.0,"dds":0.5808080808080809,"last_synced_commit":"c9f751a76e543b0f7faa07639b6e8e7948c303f6"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/brutus/wtforms-html5","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brutus%2Fwtforms-html5","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brutus%2Fwtforms-html5/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brutus%2Fwtforms-html5/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brutus%2Fwtforms-html5/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brutus","download_url":"https://codeload.github.com/brutus/wtforms-html5/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brutus%2Fwtforms-html5/sbom","scorecard":{"id":255599,"data":{"date":"2025-08-11","repo":{"name":"github.com/brutus/wtforms-html5","commit":"b25b3087d67b88ca87b3049dbc6c6e7735972bac"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/1 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/coverage.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/brutus/wtforms-html5/coverage.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/coverage.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/brutus/wtforms-html5/coverage.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/brutus/wtforms-html5/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/brutus/wtforms-html5/test.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/coverage.yml:21","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:27","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/coverage.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T09:38:49.599Z","repository_id":5435449,"created_at":"2025-08-17T09:38:49.599Z","updated_at":"2025-08-17T09:38:49.599Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30633240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["forms","html5","library","python","wtforms"],"created_at":"2024-07-31T22:01:51.154Z","updated_at":"2026-03-17T22:05:34.807Z","avatar_url":"https://github.com/brutus.png","language":"Python","readme":"# WTForms HTML5\n\n[![PyPI Status](https://img.shields.io/pypi/v/wtforms-html5.svg)](https://pypi.org/project/wtforms-html5/)\n[![Coverage Status](https://coveralls.io/repos/github/brutus/wtforms-html5/badge.svg?branch=main)](https://coveralls.io/github/brutus/wtforms-html5?branch=main)\n[![pre-commit.ci Status](https://results.pre-commit.ci/badge/github/brutus/wtforms-html5/main.svg)](https://results.pre-commit.ci/latest/github/brutus/wtforms-html5/main)\n[![Test Status](https://github.com/brutus/wtforms-html5/actions/workflows/test.yml/badge.svg)](https://github.com/brutus/wtforms-html5/actions/workflows/test.yml)\n\n**VERSION**: `0.6.1`\n\n**WTForms HTML5** generates render keywords for HTML5 INPUT widgets used by the\n[WTForms] library.\n\n## Evolution\n\n_Original Function_: This module used to add support for the new HTML5 INPUT\nelements to [WTForms]. Besides supporting the new INPUT _types_, it also set\nsome of the new _attributes_ automatically, based on widget type and what kind\nof validators where set for the field.\n\n_Changes_: [WTForms] — beginning around version 1.0.4 — started to implement\nsome of these features. As of late 2016 the development version — that\nshould become version 3 — has enough support for them IMO, so that to prevent\nthe duplication of functionality, **WTForms HTML5** dropped all the fields,\nwidgets and validators — just use vanilla [WTForms].\n\n_Current Function_: starting with `0.2` versions of **WTForms HTML5** merely\ncontain one function: `get_html5_kwargs` — it adds the automatically generated\nkeys to the _render keywords_ of a [WTForms] field. A slim subclass of the new\ndefault _Meta_ class for forms is also provided: `AutoAttrMeta`. If you use this\nclass as your forms _Meta_, you get the automatic attributes for all fields in\nyour form, just like in the original version of **WTForms HTML5**.\n\n## Supported Auto–Attributes\n\n- **required**\n\n    Is set if the field has the _required_ flag set. This happens i.e. if you use\n    the _DataRequired_ or _InputRequired_ validator. The `required` attribute is\n    used by browsers to indicate a required field (and most browsers won't\n    activate the forms action unless all required fields have content).\n\n- **invalid**\n\n    If the field got any validation errors, the CSS class _invalid_ is added. The\n    `invalid` class is also set by browsers, if they detect errors on a field.\n    The validation errors detected by your code, are then by default styled in\n    the same way as browser generated errors.\n\n- **min** / **max** and **minlength** / **maxlength**\n\n    If either _Length_ or _NumberRange_ is used as a validator to set minimal\n    and / or maximal values, the corresponding INPUT attribute is\n    set (based on which validator is used). This allows for browser based\n    validation of the values.\n\n- **title**\n\n    If no _title_ is provided for a field, the _description_ (if one is set) is\n    used for the `title` attribute.\n\n## Example\n\nDeclare your form just like in vanilla _WTForms_, but include `AutoAttrMeta`\nas your meta class:\n\n```py\n\u003e\u003e\u003e from wtforms import Form, StringField\n\u003e\u003e\u003e from wtforms.validators import InputRequired, Length\n\u003e\u003e\u003e from wtforms_html5 import AutoAttrMeta\n\u003e\u003e\u003e class MyForm(Form):\n...   class Meta(AutoAttrMeta):\n...     pass\n...   test_field = StringField(\n...     'Testfield',\n...      validators=[InputRequired(), Length(min=3, max=12)],\n...      description='Just a test field.',\n...   )\n\u003e\u003e\u003e form = MyForm()\n```\n\n**The only difference is, that you include a `Meta` class, that inherits from\n`AutoAttrMeta`.**\n\nThis meta class sets the above mentioned attributes automatically for all the\nfields of the form:\n\n```py\n\u003e\u003e\u003e form.test_field()\n'\u003cinput id=\"test_field\" maxlength=\"12\" minlength=\"3\" name=\"test_field\" required title=\"Just a test field.\" type=\"text\" value=\"\"\u003e'\n```\n\nThe _minlength_ and _maxlength_ attributes are created because the `Length`\nvalidator was used. And the field is marked _required_ because of the\n`InputRequired` validator. The field also gets a _title_ taken from the fields\n`description`.\n\nIf you validate the form and any errors pop up, the field also get `invalid`\nadded to its class:\n\n```py\n\u003e\u003e\u003e form.validate()\nFalse\n\u003e\u003e\u003e form.test_field()\n'\u003cinput class=\"invalid\" id=\"test_field\" maxlength=\"12\" minlength=\"3\" name=\"test_field\" required title=\"Just a test field.\" type=\"text\" value=\"\"\u003e'\n```\n\n## Install\n\nYou can install **WTForms HTML5** with _pip_ or from _source_.\n\n[pip] is _\"a tool for installing and managing Python packages\"_. If you don't\nhave it installed, see the [pip install instructions].\n\n```shell\npip install --user wtforms-html5\n```\n\n### Install Requirements\n\nSince **WTForms HTML5** only adds functionality to [WTForms], you need to\nhave it installed too. But if you use the installation method described\nabove, it should have been taken care of.\n\n## Testing and Contribution\n\n**WTForms HTML5** is at home at: https://github.com/brutus/wtforms-html5/\n\nYou can run `make setup` after checkout, to setup a development environment.\n\nIf you find any bugs, issues or anything, please use the [issue tracker].\n\n### Testing\n\nYou can run the provided **doctest** like this: `make doctest`. If you want to\nrun the **test cases**, run `make test` (or `make coverage`). You can also run\n`make tests-versions` to run this for all supported versions (this might take\nsome time though).\n\nIf something fails, please get in touch.\n\n[issue tracker]: https://github.com/brutus/wtforms-html5/issues\n[pip]: https://pip.pypa.io/\n[pip install instructions]: https://pip.pypa.io/en/stable/installing/\n[wtforms]: https://wtforms.readthedocs.io/\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrutus%2Fwtforms-html5","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrutus%2Fwtforms-html5","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrutus%2Fwtforms-html5/lists"}