Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Webster
=======

Webster is a self validating dict object for python.

It expands upon dict's capability by allowing you to pass in a validation
dict object with either types or regular expression values.

Then you can use it for validation by using it as a condition or get
back a detailed error response.

import Webster

# create a schema
schema = {'amount': '([+-]?\\d*\\.\\d+)(?![-+0-9\\.])',
'credit_card': {
'number': '((?:(?:\\d{4}[- ]){3}\\d{4}|\\d{16}))(?![\\d])',
'expiration_date': '((?:(?:0[1-9])|(?:1[0-2]))\\/(?:\\d{2}))(?![\\d])'}
}

# create the object and pass the schema into the init
im_a_dict = Webster(schema)

# add your values
im_a_dict['amount'] = '1.00'
im_a_dict['credit_card'] = {}
im_a_dict['credit_card']['number'] = '4111111111111111'
im_a_dict['credit_card']['expiration_date'] = '05/12'

# lets see if we are valid or not
print im_a_dict.is_valid()

Metadata

Release files for Webster 0.5.dev7.g622a542

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

Source distribution (sdist)

Source distribution for Webster 0.5.dev7.g622a542
File Size Uploaded Provenance
Webster-0.5.dev7.g622a542.tar.gz 6.8 kB Without provenance Details

Release files / Webster-0.5.dev7.g622a542.tar.gz

Download URL Webster-0.5.dev7.g622a542.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
01939f98db0be0606081e0f192c798181dc10ccaf73354cae893a1a9b56a7908
BLAKE2b-256 checksum
How to use checksums
7a470a36bb6bf46f91d024faea7ea326d9fec5f94d52c2f600d2d87aa8dd8ef5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for Webster 0.5.dev7.g622a542

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