Skip to main content
btform
=======

python web app forms tools

Code is extracted from web.py

install
=======

easy_install btform

pip install btform

example of flask
=================

#!/usr/bin/env python
#coding:utf-8

from flask import Flask
from flask import request
from btform import rules
import btform as form

app = Flask(__name__)

form1 = form.Form(
form.Textbox("name",rules.is_alphanum2(6,32),description=""),
form.Password("passwd",rules.is_alphanum2(6,32),description=""),
form.Textarea("desc",rules.len_of(1,128),description="",rows="5",),
form.Button("submit", type="submit",html="<b>submit</b>"),
)

def render_form(frm):
return "<form action='/' method='POST'>%s</form>"%frm.render()

@app.route('/', methods=['POST', 'GET'])
def hello_world():
iform = form1()
if request.method == 'GET':
return render_form(iform)
elif request.method == 'POST':
if not iform.validates(source=request.form):
return render_form(iform)
else:
return "ok"

if __name__ == '__main__':
app.run()

Metadata

Release files for btform 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for btform 0.1
File Interpreter ABI Platform Actions
btform-0.1.linux-x86_64.tar.gz Details for btform-0.1.linux-x86_64.tar.gz
btform-0.1-py2-none-any.whl Python 2 none any Details for btform-0.1-py2-none-any.whl

Total release size: 26.8 kB

Release files / btform-0.1.linux-x86_64.tar.gz

Download URL btform-0.1.linux-x86_64.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d6fa14e8f0663c2ee525ef874d6b8bc3fa0467072a29859dd4aeb9d667e9d15d
BLAKE2b-256 checksum
How to use checksums
226ab0b4cef08ea0081bef7bda2a626e0b69a96d137f2a45d96333d4b3ca4191
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / btform-0.1-py2-none-any.whl

Download URL btform-0.1-py2-none-any.whl
Size 10.6 kB
Tags Python 2
SHA-256 checksum
How to use checksums
cdc889adc3eae37340639ea6ee8be46e93f2f30b7e414e9105b251cb5aa41427
BLAKE2b-256 checksum
How to use checksums
005a9d78e5cde6f9bcbd01f2d6dbcafcc8bf0e623fb751093bac97c47649bca6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for btform 0.1

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.

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page