bagof-validators
Hint-based validators that operate at runtime.
Example
>>> from collections import abc
>>> from bagof.validators import get_validator
>>> validate = get_validator(abc.Sequence[int])
>>> validate([1, 2, 3])
>>> validate(1)
TypeValidationError: IsSequence(collections.abc.Sequence[int]): Not a valid instance.
|> value = 1
>>> validate(["a", "b", "c"])
ValueValidationError: IsSequence(collections.abc.Sequence[int]): Iterable's 0th element is not valid.
|> value = ['a', 'b', 'c']
Metadata
Release files for bagof-validators 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bagof_validators-0.1.tar.gz | 30.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bagof_validators-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 49.3 kB
Release files / bagof_validators-0.1.tar.gz
| Download URL | bagof_validators-0.1.tar.gz |
|---|---|
| Size | 30.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
34adb0d548ac8ec8e87a31b00adf4e2892aa4fce86189eb4b13c0363e76bbb52
|
|
BLAKE2b-256 checksum How to use checksums |
4bc1d88117d666ccc7a669ce8be97484bfd9ef3e39582e975fa463782c0585bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / bagof_validators-0.1-py3-none-any.whl
| Download URL | bagof_validators-0.1-py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
129df7b1baca9f9418b8873de78dd5a4efeca7b218012db415277a9900246770
|
|
BLAKE2b-256 checksum How to use checksums |
52aeb819d19b80007dc1954fd31cf9165f41fe801b2e0b108e6a193ed8c836fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|