Skip to main content

MailSchema for Python

PyPI CI

Validate Mail Action Protocol documents and MailSchema Registry contributions with Draft 2020-12 JSON Schema checks.

Specification · Registry · Tools · Source

Install

pip install mailschema

Python 3.10 or newer is required.

Validate MAP documents

from mailschema import validate_map_document, validate_content_review_request

validate_map_document(description)
validate_content_review_request(request)

The CLI performs the same checks against local JSON files:

python -m mailschema check description.json --map
python -m mailschema check request.json --content-review

Work with Registry data

from mailschema import contribution_errors, get_contribution_schema, validate_contribution

errors = contribution_errors(candidate)
validate_contribution(candidate)  # Raises ValueError for invalid input.
schema = get_contribution_schema()

validate_record, record_errors and get_record_schema handle expanded Registry records. Pass --record to the CLI for the corresponding record format.

The package bundles the MAP 0.1, Content Review 0.1 and Registry schemas. It uses the established jsonschema and referencing libraries for validation and performs no network requests.

Trust boundary

A valid document is structured input. Validation does not authenticate a service, grant authority, approve an action, resolve Registry history or establish product conformance. Implementations must apply their own endpoint trust, credentials, permissions and policy before executing a request.

The CLI reads one local file of at most 256 KiB and does not upload or modify it. Package versions and MAP profile versions advance independently. MIT licensed.

Metadata

Release files for mailschema 0.1.2

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

Source distribution (sdist)

Source distribution for mailschema 0.1.2
File Size Uploaded Provenance Actions
mailschema-0.1.2.tar.gz 11.4 kB Without provenance Details for mailschema-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mailschema 0.1.2
File Interpreter ABI Platform Actions
mailschema-0.1.2-py3-none-any.whl Python 3 none any Details for mailschema-0.1.2-py3-none-any.whl

Total release size: 21.0 kB

Release files / mailschema-0.1.2.tar.gz

Download URL mailschema-0.1.2.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
03258ef6dbbb02d99934129915894ac046a47c5b8f1c212b9f37094a883e071c
BLAKE2b-256 checksum
How to use checksums
0a6c6a6e0aaf9b8cf15600ffce8cc8707b0692cce444b9b3ab6287e9cd4e39dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / mailschema-0.1.2-py3-none-any.whl

Download URL mailschema-0.1.2-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e834adf9b0635222f5cd1acaaa3b0f7991a47099f052db8280269e1eb49f3cef
BLAKE2b-256 checksum
How to use checksums
bf76a9473dccaf0efd24663a8c2c273247625de3a1680bf0459926b8d5656b5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for mailschema 0.1.2

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.

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