flask-wtforms-htmx
A drop-in FlaskForm that brings
wtforms-htmx to
Flask-WTF.
Status: alpha, work in progress.
HtmxFlaskForm replaces Flask-WTF's FlaskForm. The usual
validate_on_submit() view answers htmx requests, and a mutation click
without JavaScript does not save the form. CSRF protection and file
uploads work as with Flask-WTF.
Installation
pip install flask-wtforms-htmx
Example
from flask import redirect, render_template, url_for
from wtforms import ButtonField, FieldList, StringField, SubmitField
from wtforms_htmx.mutations import list_add
from flask_wtforms_htmx import HtmxFlaskForm
class TagsForm(HtmxFlaskForm):
tags = FieldList(StringField(), min_entries=1)
add_tag = ButtonField("+").triggers("tags", list_add)
save = SubmitField("Save")
@app.route("/tags", methods=["GET", "POST"])
def tags():
form = TagsForm()
if form.validate_on_submit():
save(form.data)
return redirect(url_for("tags"))
return render_template("tags.html", form=form)
With htmx, a click on + adds a row without reloading the page. Without
JavaScript, it reloads the page with the new row, and the form is not
saved.
Links
- Documentation: https://flask-wtforms-htmx.readthedocs.io/
- Source: https://github.com/yaal-coop/flask-wtforms-htmx
- Issues: https://github.com/yaal-coop/flask-wtforms-htmx/issues
License
BSD-3-Clause. See LICENSE.rst.
Metadata
Release files for flask-wtforms-htmx 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flask_wtforms_htmx-0.1.0.tar.gz | 5.6 kB | With provenance | Details for flask_wtforms_htmx-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flask_wtforms_htmx-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for flask_wtforms_htmx-0.1.0-py3-none-any.whl |
Total release size: 10.8 kB
Release files / flask_wtforms_htmx-0.1.0.tar.gz
| Download URL | flask_wtforms_htmx-0.1.0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
29a460421c7f0a0f2bb3f0a12c1a922f0afb2f3b781789c70820b958774c78db
|
|
BLAKE2b-256 checksum How to use checksums |
6765dd9d168284cbf886285ba82d1ae2671ab331f01344eec1968fc53fbac0b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logRelease files / flask_wtforms_htmx-0.1.0-py3-none-any.whl
| Download URL | flask_wtforms_htmx-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f02e5a18c607267fecca08bd944bfe22a1dd2d42ba2b3b4e03ab642f2e2723a
|
|
BLAKE2b-256 checksum How to use checksums |
96feb270c403a50c6537fcb4bf59f34b207939a5e566cd380428414695448bdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logSecurity for flask-wtforms-htmx 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for flask_wtforms_htmx-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.