🔍 v6e
A simple, type-safe, and extensible Python parsing and validation framework
Why the name?
v6e comes from the numeronym of "validate".
Usage
import v6e as v
my_parser = v.int().gte(18).lte(21)
# Use it only to check if the value conforms
my_parser.check(18) # True
my_parser.check(21) # True
my_parser.check(54) # False
# Use `.parse()` (or call it) to validate and get the parsed value
my_parser.parse(21) # Ok -> Returns 21 (int)
my_parser.parse("21") # Ok -> Returns 21 (int)
my_parser.parse(54) # Err -> Raises a ParseException
my_parser(54) # Err -> Raises a ParseException
v6e also supports custom parsers, custom reusable types, unions of parsers, and more. See more in our docs!
Examples
Check out the examples in ./examples! You can run them locally with:
uv run examples/parsers.py
🐍 Type-checking
This library is fully type-checked. This means that all types will be correctly inferred from the arguments you pass in.
In this example your editor will correctly infer the type:
my_parser = v.int().gte(8).lte(4)
t.reveal_type(my_parser) # Type of "my_parser" is "V6eInt"
t.reveal_type(my_parser.check) # Type of "my_parser.check" is "(raw: Any) -> bool"
t.reveal_type(my_parser.safe_parse) # Type of "my_parser" is "(raw: Any) -> V6eResult[int]"
t.reveal_type(my_parser.parse) # Type of "my_parser" is "(raw: Any) -> int"
t.reveal_type(my_parser.__call__) # Type of "my_parser" is "(raw: Any) -> int"
Why should I care?
Type checking will help you catch issues way earlier in the development cycle. It will also provide nice autocomplete features in your editor that will make you faster ⚡.
Alpha notice
This project is still in its alpha phase. Expect frequent and breaking changes. You can see
more in our planned work doc.
Metadata
Release files for v6e 0.1.18
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| v6e-0.1.18.tar.gz | 21.9 kB | With provenance | Details for v6e-0.1.18.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| v6e-0.1.18-py3-none-any.whl | Python 3 | none | any | Details for v6e-0.1.18-py3-none-any.whl |
Total release size: 34.2 kB
Release files / v6e-0.1.18.tar.gz
| Download URL | v6e-0.1.18.tar.gz |
|---|---|
| Size | 21.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97b94543a6452bca4ccdae8fa8bb18b94826105c132032431b520b176574205f
|
|
BLAKE2b-256 checksum How to use checksums |
de7ed4217639357a3bcd14eebe928124978253f748ac178bcf9db78e7a004e7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 10, 2025.
Transparency logRelease files / v6e-0.1.18-py3-none-any.whl
| Download URL | v6e-0.1.18-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1fcaacefc4f7603fc3d17ca8ea7d5a4577e95211c4ab6a42f4c92b6970e34d8f
|
|
BLAKE2b-256 checksum How to use checksums |
de2169f58ac9b8aeaa4b12cc4699623860450335afb256eaaa8a20506e0c5205
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 10, 2025.
Transparency logSecurity for v6e 0.1.18
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for v6e-0.1.18.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 10, 2025.
Transparency logA 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.