Skip to main content

A proper flexible Python form library

Project description

Proper Forms

Proper Forms is a flexible form library to make far easier to create beautiful, semantically rich, syntactically awesome, readily stylable and wonderfully accessible HTML forms in your Python web application.

Documentation: https://proper-forms.scaletti.dev

pip install proper-forms

How Proper Forms is different

  • A field isn't tied to a specific HTML tag, so can be presentend in multiple ways. Even the same form can be used in different contexts and have different widgets and styles on each. A set of options as checkboxes, a select multiple, or a comma-separated input? You got it. A date as a calendar or as three selects? No problem.

  • Many commonly used built-in validators, and you can also write simple functions to use as custom ones.

  • Any field can accept multiple values; as a list or as a comma-separated text.

  • All error messages are customizable. The tone of the messages must be able to change or to be translated.

  • Incredible easy to integrate with any ORM (object-relational mapper). Why should you need another library to do that?

Just show me how it looks

from proper_forms import Form, Email, Text


class CommentForm(Form):
    email = Email(required=True, check_dns=True)
    message = Text(
    	LongerThan(5, "Please write a longer message"),
    	required=True
    )


def comment():
    form = CommentForm(request.POST)
    if request.method == "POST" and form.validate():
    	data = form.save()
        ...
    return render_template("comment.html", form=form)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

proper_forms-0.8.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

proper_forms-0.8-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

Details for the file proper_forms-0.8.tar.gz.

File metadata

  • Download URL: proper_forms-0.8.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.9.18 Linux/6.2.0-1018-azure

File hashes

Hashes for proper_forms-0.8.tar.gz
Algorithm Hash digest
SHA256 7ca7a06aec0268ef53d15f04f40f60923c15baf8cd2136f42dde871c71dcfe3f
MD5 e481f1e3aee52085d453db075cd96943
BLAKE2b-256 36849cde148c9615f2b610ce1b3e814b53208c9d666466007eaab6107d292b44

See more details on using hashes here.

File details

Details for the file proper_forms-0.8-py3-none-any.whl.

File metadata

  • Download URL: proper_forms-0.8-py3-none-any.whl
  • Upload date:
  • Size: 25.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.9.18 Linux/6.2.0-1018-azure

File hashes

Hashes for proper_forms-0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 706ada401847613b5dac9a44a1bf22afa8e01a44b3883f1007dab2d894daabca
MD5 96fee5cd0004a330f0ae7ddbceb1b041
BLAKE2b-256 2bfbd87e64f242ef28382b2b4bbcc619d2b8c37d12f9d5560019eff20c03d129

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page