Skip to main content

Business-level input validation and sanitization for Python applications

Project description

python-input-validation

Business-level input validation and sanitization for Python applications.

Installation

pip install python-input-validation

Usage

from python_input_validation import (
    validate_email_format,
    validate_string_length,
    sanitize_email,
    sanitize_text_input
)

# Validate email
is_valid = validate_email_format("user@example.com")  # True

# Validate length
is_valid = validate_string_length("hello", min_length=3, max_length=10)  # True

# Sanitize email
clean_email = sanitize_email("  USER@EXAMPLE.COM  ")  # "user@example.com"

# Sanitize text
clean_text = sanitize_text_input("  hello world  ", max_length=10)  # "hello worl"

Features

  • ✅ Email validation
  • ✅ Length validation
  • ✅ Email sanitization
  • ✅ Text sanitization
  • ✅ Zero dependencies
  • ✅ Framework-agnostic

License

MIT

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

python_input_validation-0.1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

python_input_validation-0.1.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file python_input_validation-0.1.0.tar.gz.

File metadata

  • Download URL: python_input_validation-0.1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for python_input_validation-0.1.0.tar.gz
Algorithm Hash digest
SHA256 7a9190c173a6513e1a9f91ec11e9bbf106184fe0137afa2b6440a04be07aaa47
MD5 730def0520fc7ab48ba4d2a6a9347220
BLAKE2b-256 411f6027045125409a9ea9ee2120c70db6b472645bc6fd4c664a5e0d6eae9113

See more details on using hashes here.

File details

Details for the file python_input_validation-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_input_validation-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24d17eb171544fe83807a3b39d3c5f060475882436b4b1219508c2b09166cded
MD5 fad70db14ce556455b08f8765909cb33
BLAKE2b-256 89dd7e628f7bb8bbe7e0b6c6722fe1b37ed6eb6f5eb60414b5bdb1ebc3b59eed

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