Skip to main content

Validator for data from social networks & messengers

Project description

Social validator

CI codecov Code style: black PyPI - Python Version License

❓ What's this

This is a library for validating data from social networks and messengers, such as identifiers, usernames, etc.

⚡ Motivation

The motivation behind creating this library stemmed from the lack of a centralized database containing restrictions for each service. Often, validating data correctly requires thoroughly analyzing documentation or manually testing validation. This library aims to solve this problem but is currently available only for Python.

💽 Installation

You can use pip or fext to install the library:

fext install social-validator

✨ Usage

The interface for validating the values of each service looks like this:

from social_validator import telegram

# Functions starting with "is" are used for boolean value checking.
telegram.is_valid_id("test_user_id")  # True

# Functions starting with "validate" perform full-fledged validation,
# formatting and raising "social_validator.exceptions.ValidationError" if the
# validation fails.
telegram.validate_id("test_user_ID")  # "test_user_id"

# Note: Each validation function is based on a corresponding boolean check
# function, but not vice versa.
telegram.validate_command("cmd") and telegram.is_valid_command("cmd")

Documentation for each method is available via docstrings. If you really need documentation as a separate page, please open issue.

⚠️ Roadmap

The project is under development and is moving to a stable version. To track the status, you can follow the link.

🛠️ Contributing

If you want to contribute to development, request a feature, or report a bug, please open an issue with the appropriate label.

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

social_validator-0.3.0.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

social_validator-0.3.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file social_validator-0.3.0.tar.gz.

File metadata

  • Download URL: social_validator-0.3.0.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.0

File hashes

Hashes for social_validator-0.3.0.tar.gz
Algorithm Hash digest
SHA256 40ca9b0b4663889b372ff89ce77e0aec87135385843e3ef11a7dcd8d094ed195
MD5 87496821a9bbff0186497416472e0290
BLAKE2b-256 9db26eeb0429d070e79fe48b1977ee1ed537097a8f4186d6652f16d22fabc75e

See more details on using hashes here.

File details

Details for the file social_validator-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for social_validator-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 029547de3ad9c041143326d741ae9651d4eb233a76d8393b34b4b5f9a19e07cb
MD5 f2d6eb6bba82b18e7d2646b74571116e
BLAKE2b-256 567ce803b75a3386a0662b72becd32cf2e16babdb577e685dfeb8b807d0d9bcb

See more details on using hashes here.

Supported by

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