pyvalidator
Validate Python objects
Installation
pip install pyvalidator
💡 Usage Examples
Basic Operations
from pylib_validator import Schema, validate
# Define validation schema
schema = Schema({
"name": lambda x: isinstance(x, str) and len(x) > 0,
"age": lambda x: isinstance(x, int) and 0 < x < 150,
"email": lambda x: "@" in str(x)
})
# Validate data
data = {"name": "John", "age": 30, "email": "john@example.com"}
is_valid, errors = validate(data, schema)
# (True, [])
AI/ML Use Cases
from pylib_validator import Schema, validate
# Validate ML model inputs
input_schema = Schema({
"features": lambda x: isinstance(x, list) and len(x) > 0,
"model_type": lambda x: x in ["classification", "regression"]
})
is_valid, errors = validate(model_input, input_schema)
📚 API Reference
See package documentation for complete API reference.
🤖 AI Agent Friendly
This package is optimized for AI agents and code generation tools:
- Clear function names and signatures
- Comprehensive docstrings with examples
- Type hints for better IDE support
- Common use cases documented
- Zero dependencies for reliability
License
MIT
Metadata
Release files for pylib-validator 0.1.0
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 |
|---|---|---|---|---|
| pylib_validator-0.1.0.tar.gz | 2.3 kB | Without provenance | Details for pylib_validator-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pylib_validator-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pylib_validator-0.1.0-py3-none-any.whl |
Total release size: 4.3 kB
Release files / pylib_validator-0.1.0.tar.gz
| Download URL | pylib_validator-0.1.0.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
badc867077975fa1e8ec8212e9403b284055563c8471ed75567c7d61ffe4540d
|
|
BLAKE2b-256 checksum How to use checksums |
644023849296ddcc91f8c64687a0b4dbadf6261a20b03574d75202d6c4eec43c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / pylib_validator-0.1.0-py3-none-any.whl
| Download URL | pylib_validator-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fddd3e798062e08adca39b650b4ac72565e9371d765c1218388dd70b2fd4c58
|
|
BLAKE2b-256 checksum How to use checksums |
5f34b828dac8a81287c2f9d3c43f0c26437713d8aacdbcfa04f00fe8c00fd702
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for pylib-validator 0.1.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.