A simple datavalidator for validating email, phone numbers, dates, and URLs.
Project description
datacheckerpro
Overview
dataverifier is a Python package designed to efficiently validate various types of personal data, including:
- Email addresses
- Phone numbers
- Dates
- URLs
This package follows Object-Oriented Programming (OOP) principles, ensuring modularity, reusability, and easy integration into different projects.
Installation
Install the package using:
pip install dataverifier
---
## **Usage**
### **1 Import the Validator Class**
```python
from dataverifier.validator import DATAVALIDATOR
2 Validate an Email
data = "example@gmail.com"
validator = DATAVALIDATOR(data)
print(validator.validate_email()) # Output: True
3 Validate a Phone Number
data = "+1-832-005-3034"
validator = DATAVALIDATOR(data)
print(validator.validate_phone()) # Output: True
To check if a number if from a particular contitnent , you can do this
data = "+234901245890"
validator = DATAVALIDATOR(data)
print(validator.african_numbers()) #output :True
repeat for other continents by simply calling the method continentname_numbers()
4 Validate a Date
data = "2024-02-1123"
validator = DATAVALIDATOR(data)
print(validator.validate_date()) # Output: False
5 Validate a URL
data = "https://google.com"
validator = DATAVALIDATOR(data)
print(validator.validate_url()) # Output: True
Running Tests
The package includes unit tests to ensure proper functionality. Run tests using:
pytest-v
Contributing
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch:
git checkout -b featurebranch
- Commit your changes:
git commit -m "Added new feature"
- Push to the branch:
git push origin featurebranch
- Open a Pull Request
License
This project is licensed under the MIT License.
Author
👤 OKOLI OGECHUKWU ABIMBOLA 📧 Email: okoliogechi74@gmail.com
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dataverifier-0.1.tar.gz.
File metadata
- Download URL: dataverifier-0.1.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7613c6a784b3dff61399612f28899e44ec75de4c9a036bd9ebc5b0a1202f8971
|
|
| MD5 |
31b798aae31696139ac4efd032c8190c
|
|
| BLAKE2b-256 |
d82264cf323e40277cb7e75c83ea36639ab4ac1b4740a6690e66f692d037fd1d
|
File details
Details for the file dataverifier-0.1-py3-none-any.whl.
File metadata
- Download URL: dataverifier-0.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
993ecf1ddb444bb740972ee9b6e7617fb74086478e1d6d5d5ea110d773e17f5d
|
|
| MD5 |
dd974b241cd46e26566c51f8f72c429f
|
|
| BLAKE2b-256 |
7767926bd899c73c51ff6a5061097feac80803a63707f8e2624559219436ab1f
|