Skip to main content

Introduction

wtforms-jsonschema converts WTForms into JSON Schema compatibile representations

Requirements

  • Python 2.6 or later

  • Wtforms

Usage

To convert a form to a JSON Schema:

from wtforms_jsonschema.jsonschema import WTFormToJSONSchema

schema_repr = WTFormToJSONSchema().convert_form(MyForm)

TODO: To embed a JSON Schema as a form field:

from wtforms_jsonschema.forms import JSONSchemaField

#where schema is a python dictionay like schema_repr in the first exmaple

class MyForm(forms.Form):
    subfield = JSONSchemaField(schema=schema)

form = MyForm(data={'subfield':'<json encoded value>'})
form.validate() #will validate the subfield entry against schema
form['subfield'].as_widget() #will render a textarea widget with a data-schemajson attribute

Metadata

Release files for wtforms-jsonschema 0.0.7

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

Source distribution (sdist)

Source distribution for wtforms-jsonschema 0.0.7
File Size Uploaded Provenance
wtforms-jsonschema-0.0.7.tar.gz 3.3 kB Without provenance Details

Release files / wtforms-jsonschema-0.0.7.tar.gz

Download URL wtforms-jsonschema-0.0.7.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
62e1191c66ce81907da55c33319b4c1fca496861e4406f61f653e4b26b8a30a9
BLAKE2b-256 checksum
How to use checksums
7f81b38800a48a919b63b8ed144f2c5f5aa30f666cc699d653a22cafa646dec1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for wtforms-jsonschema 0.0.7

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.

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