Skip to main content

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.

Metadata

Release files for social-validator 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for social-validator 0.3.1
File Size Uploaded Provenance Actions
social_validator-0.3.1.tar.gz 23.2 kB Without provenance Details for social_validator-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for social-validator 0.3.1
File Interpreter ABI Platform Actions
social_validator-0.3.1-py3-none-any.whl Python 3 none any Details for social_validator-0.3.1-py3-none-any.whl

Total release size: 34.4 kB

Release files / social_validator-0.3.1.tar.gz

Download URL social_validator-0.3.1.tar.gz
Size 23.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8b9bffdbce19e8874931668557bbe837dc0e5332024c47874910f339e1148ee7
BLAKE2b-256 checksum
How to use checksums
edd4e0f00a987921e1cae722d4a8286252642a51498b13226a6ded143e23dd02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.0

Release files / social_validator-0.3.1-py3-none-any.whl

Download URL social_validator-0.3.1-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c5efdef165df19df75e752226c4cbf421f86f83abf7a3523593074ee2fe89f4
BLAKE2b-256 checksum
How to use checksums
da4110af5a911f0d6ed4c06e70f2aa602cda445596d175011c0f33230b70a345
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.0

Security for social-validator 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page