WTForms extensions for Tornado.
Project description
WTForms extensions for Tornado.
WTForms-Tornado targets Python 3.11+.
Usage
import tornado.ioloop
import tornado.web
from wtforms import IntegerField
from wtforms.validators import DataRequired
from wtforms_tornado import Form
class SumForm(Form):
a = IntegerField(validators=[DataRequired()])
b = IntegerField(validators=[DataRequired()])
class SumHandler(tornado.web.RequestHandler):
def get(self):
self.write('Hello, world')
def post(self):
form = SumForm(self.request.arguments)
if form.validate():
self.write(str(form.data['a'] + form.data['b']))
else:
self.set_status(400)
self.write(str(form.errors))
application = tornado.web.Application([
(r"/", SumHandler),
])
if __name__ == "__main__":
application.listen(8888)
tornado.ioloop.IOLoop.current().start()
Installation
Install the package with pip:
pip install wtforms-tornado
Or from a local checkout:
pip install .
For development work, install the dev extras:
pip install -e '.[dev]'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wtforms_tornado-0.1.0.tar.gz.
File metadata
- Download URL: wtforms_tornado-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f9a39ee917218af0e82228505bc3ea8beda8c6e319b45ce707cd44c362c5965
|
|
| MD5 |
e4b55c0085fe903436e358112b7602b8
|
|
| BLAKE2b-256 |
441b28ee08dce784b4031bd65f1e6028656bbf1721d0888195f018cef021b8a4
|
Provenance
The following attestation bundles were made for wtforms_tornado-0.1.0.tar.gz:
Publisher:
publish.yml on puentesarrin/wtforms-tornado
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wtforms_tornado-0.1.0.tar.gz -
Subject digest:
0f9a39ee917218af0e82228505bc3ea8beda8c6e319b45ce707cd44c362c5965 - Sigstore transparency entry: 2051252818
- Sigstore integration time:
-
Permalink:
puentesarrin/wtforms-tornado@1e72200185211460e031b5c05ea0a4ec970ba99c -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/puentesarrin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1e72200185211460e031b5c05ea0a4ec970ba99c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file wtforms_tornado-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wtforms_tornado-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eccdfe27563550fa2578706be994833be83eb126e88c85d66d36fd66386fc97f
|
|
| MD5 |
09c64a20907c0b288501df4f97ee30bf
|
|
| BLAKE2b-256 |
6b6e4fcc50bcb5c9849701b9c515152358801d3a07954f1a4051b0c44f87ad92
|
Provenance
The following attestation bundles were made for wtforms_tornado-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on puentesarrin/wtforms-tornado
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wtforms_tornado-0.1.0-py3-none-any.whl -
Subject digest:
eccdfe27563550fa2578706be994833be83eb126e88c85d66d36fd66386fc97f - Sigstore transparency entry: 2051252882
- Sigstore integration time:
-
Permalink:
puentesarrin/wtforms-tornado@1e72200185211460e031b5c05ea0a4ec970ba99c -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/puentesarrin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1e72200185211460e031b5c05ea0a4ec970ba99c -
Trigger Event:
workflow_dispatch
-
Statement type: