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.6.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.6.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vtb_object_bleach-0.6.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.6.0.tar.gz
Algorithm Hash digest
SHA256 c745324f4ab3cd420b611069c6626d5a9695439e3554d3d403a87d954cac1556
MD5 16b093d7d45961fa2641905361660cae
BLAKE2b-256 9c100e60561c65c1b5bfbf2eccaadfed8b106458b286e4cd43e141a113595adb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vtb_object_bleach-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 833680d7563431742991c235692a3bd3aa21c8ce4158cdcbc49d95cf0fa93794
MD5 fd582d2f57b081499a504b54812300cc
BLAKE2b-256 b575eea001ec0e038d87015843f128008fb263139729ec958fa0f663a38a8ed6

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