🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

datacheckerpro

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datacheckerpro

A simple datavalidator for validating email, phone numbers, dates, and URLs.

0.1
PyPI
Maintainers
1

datacheckerpro

Overview

datacheckerpro 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 datacheckerpro


---

## **Usage**

### **1️⃣ Import the Validator Class**
```python
from datacheckerpro.validator import DATAVALIDATOR

2️⃣ Validate an Email

data = "example@email.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 froma 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: True

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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts