Skip to main content

Value substitutor for district42 schema

Project description

revolt

Codecov PyPI PyPI - Downloads Python Version

Value substitutor for district42 schema

(!) Work in progress, breaking changes are possible until v2.0 is released

Installation

pip3 install revolt

Usage

from district42 import schema
from revolt import substitute

UserSchema = schema.dict({
    "id": schema.int,
    "name": schema.str | schema.none,
    "id_deleted": schema.bool,
})

substituted = substitute(UserSchema, {"id": 1, "name": "Bob"})

# syntax sugar
substituted = UserSchema % {"id": 1, "name": "Bob"}

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

revolt-1.3.3.tar.gz (12.7 kB view hashes)

Uploaded Source

Built Distribution

revolt-1.3.3-py3-none-any.whl (18.8 kB view hashes)

Uploaded Python 3

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