MyValidator
A Python package for validating structured objects and preventing security threats.
Installation
pip install vtb_object_bleach
Usage
from vtb_object_bleach import Validator
schema = {
"name": "string",
"email": "string",
"age": "int",
"password": "string",
"date": "date",
"balance": "float"
}
validator = Validator(schema)
user_input = {
"name": "Alice",
"email": "alice@example.com",
"age": 25,
"password": "StrongPass@123",
"date": "2024-02-07",
"balance": 150.75
}
validator.validate(user_input)
Features
- Schema-based validation: Ensure input objects match a defined schema.
- Security threat detection: Detects SQL injection and XSS attempts.
- Email format validation: Ensures correct email structure.
- Password strength validation: Enforces password complexity rules.
- Logging support: Logs security threats for better monitoring.
- Performance optimizations: Uses compiled regex for efficiency.
Running Tests
To run tests, use:
python -m unittest discover tests
License
MIT License. See LICENSE file for details.
Metadata
Release files for vtb-object-bleach 0.9.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 | |
|---|---|---|---|
| vtb_object_bleach-0.9.0.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| vtb_object_bleach-0.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.8 kB
Release files / vtb_object_bleach-0.9.0.tar.gz
| Download URL | vtb_object_bleach-0.9.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f8660c5156f7efd070075356b07e3a162be14fff386c352b0a85540a9239eea
|
|
BLAKE2b-256 checksum How to use checksums |
61fac74a9c4ea9a76c137bf2fbcc7ce55806b26ef4fafa8de56699b2f368196b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / vtb_object_bleach-0.9.0-py3-none-any.whl
| Download URL | vtb_object_bleach-0.9.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67884883683255831b9ff47086c4ce46b446ff767affdf07c388d96f376bf43c
|
|
BLAKE2b-256 checksum How to use checksums |
ad8cc752960ec138d090bc8e278767a89ee8c98b278670b37b0c7d4d2253eeae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|