canonicalwebteam.form_generator
Flask extension that generates unique HTML forms based on json data and registers them to URLs.
Installation and usage
Install the project with pip: pip install canonicalwebteam.form-generator
You can then initialize it by passing a Flask app instance and path to the form template, and then load the forms:
from canonicalwebteam.form_generator import FormGenerator
form_template_path = "path/to/form-template.html"
form_loader = FormGenerator(app, form_template_path)
form_loader.load_forms()
You can then call the load_forms function from within a Jinja template. Providing a path for the form-data.json (required), a formId (optional) and isModal (optional):
{{ load_form('/aws', 1234) | safe }}
{{ load_form('/aws', 1234, True) | safe }}
{{ load_form('/aws', isModal=True) | safe }}
See the full guide for more information.
Local development
Running the project
This guide assumes you are using dotrun.
Include a relative path to the project in your requirements.txt (this example assumes both project exist in the same dir):
-e ../form-generator
Run dotrun with a mounted additor:
dotrun -m /path/to/canonicalwebteam.form-generator:../form-generator
A more detailed guide can be found here (internal only).
Linting
To use the standard linting rules of this project you should use Tox:
pip3 install tox # Install tox
tox -e lint # Check the format of Python code
tox -e format # Reformat the Python code
Metadata
Release files for canonicalwebteam.form-generator 2.2.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 |
|---|---|---|---|---|
| canonicalwebteam_form_generator-2.2.0.tar.gz | 16.3 kB | Without provenance | Details for canonicalwebteam_form_generator-2.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| canonicalwebteam_form_generator-2.2.0-py3-none-any.whl | Python 3 | none | any | Details for canonicalwebteam_form_generator-2.2.0-py3-none-any.whl |
Total release size: 33.5 kB
Release files / canonicalwebteam_form_generator-2.2.0.tar.gz
| Download URL | canonicalwebteam_form_generator-2.2.0.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f8c8688b15b62f1025930df82fd598f5eee54455413cc3d278be4532312b0bee
|
|
BLAKE2b-256 checksum How to use checksums |
7a3aaf96795579c341afea44e43fcdaf8eba23ce864ec3b02cbf008131c824eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / canonicalwebteam_form_generator-2.2.0-py3-none-any.whl
| Download URL | canonicalwebteam_form_generator-2.2.0-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0fbf7dfc9a7c10d4ef7bb86cc11d6ee73d2e15a4ebd44f2ab6d5fbb1eea76fa7
|
|
BLAKE2b-256 checksum How to use checksums |
9b3ae67e3f082505657ca6e6a8ee7280fd09d03028a6d8279cbd153f80909506
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for canonicalwebteam.form-generator 2.2.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.