Skip to main content

A Python package for validating structured objects with security scanning

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vtb_object_bleach-0.9.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vtb_object_bleach-0.9.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file vtb_object_bleach-0.9.0.tar.gz.

File metadata

  • Download URL: vtb_object_bleach-0.9.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for vtb_object_bleach-0.9.0.tar.gz
Algorithm Hash digest
SHA256 2f8660c5156f7efd070075356b07e3a162be14fff386c352b0a85540a9239eea
MD5 15a8bc76947e5592334ce3e996c38023
BLAKE2b-256 61fac74a9c4ea9a76c137bf2fbcc7ce55806b26ef4fafa8de56699b2f368196b

See more details on using hashes here.

File details

Details for the file vtb_object_bleach-0.9.0-py3-none-any.whl.

File metadata

File hashes

Hashes for vtb_object_bleach-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67884883683255831b9ff47086c4ce46b446ff767affdf07c388d96f376bf43c
MD5 3d2dcbc7cc06b76ef64577ae2b0642a4
BLAKE2b-256 ad8cc752960ec138d090bc8e278767a89ee8c98b278670b37b0c7d4d2253eeae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page