Skip to main content

JSON Schema is good but very verbose. Writing it by hand is hard. This library defines a simpler version of JSON Schema. It supports only part of the full spec and turns that simpler format into standard JSON Schema.

Examples:

an object

{
    "x": "string",
    "y": "number",
}

nullable fields

{
    "x?": "string",
}

"x?" is a shortcut for

{
    "x": ["string", "null"],
}

union fields

{
    "x": ["string", "number"],
}

array

{
    "x": ["string"],
}

enum (uses set type in python)

{
    "x": {1,2,3,"unknown",null},
}

complex union type

{
    "x": [
        "number",
        { "z": "string" },
    ],
}

By default, the object schema is strict: all properties are required, and no extra properties are allowed.

Code example:

from schemautil import object_schema

object_schema({
    "x": "string",
    "y": "number",
})

Metadata

Release files for bfg-schemautil 0.2.0

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

Source distribution (sdist)

Source distribution for bfg-schemautil 0.2.0
File Size Uploaded Provenance
bfg_schemautil-0.2.0.tar.gz 6.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for bfg-schemautil 0.2.0
File Interpreter ABI Platform
bfg_schemautil-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.8 kB

Release files / bfg_schemautil-0.2.0.tar.gz

Download URL bfg_schemautil-0.2.0.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b5833bd8cd548fced4798cc71ef66ecc10353dc33e426bba53057eee3ef23b40
BLAKE2b-256 checksum
How to use checksums
9e354c6e5c0e8aad3550dcf3c0726b6cddc14e7cd14b0ec5a124587ec418952c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.12

Release files / bfg_schemautil-0.2.0-py3-none-any.whl

Download URL bfg_schemautil-0.2.0-py3-none-any.whl
Size 2.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45a0e5fa9fae634844527c4a7bdbe952290cc183c2c4707624d9f8cf64575d8d
BLAKE2b-256 checksum
How to use checksums
8385f4630d5baa4256f0bb7ca50c21f8f5fcec4e14e9677fe63bbf3447931de1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.12

Security for bfg-schemautil 0.2.0

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