Skip to main content

A python utility that can validate strings and so much . Still under active development

Project description

Python Validatord forthebadgeforthebadge

PyPI license PyPI - Wheel

A python validators module that makes validation easy with functions like mail() . Please note that this module is still under active development and it is dependency free .

Table of contents

Installation

In order to install it you can use pip the defualt Python Package Installer . It's easy , on windows open cmd as adminsistrator and type

pip install pyvalidator

For linux systems

sudo pip3 install pyvalidator

Usage

Using pyvalidator is easy . Here are some examples with the pyvalidator functions ...

import pyvalidator
print(pyvalidator.email('email@email.com'))
print(pyvalidator.ipv4('255.255.255.0'))
print(pyvalidator.url("https://www.google.com"))
print(pyvalidator.equals('testish', 'testish'))
print(pyvalidator.islower('test'))
print(pyvalidator.number('1'))
print(pyvalidator.md5('8b1a9953c4611296a827abf8c47804d7'))

email(str) -> Checks if given parameter is a string

import pyvalidator
print(pyvalidator.email('adiba@a.com'))

currency(str) -> Checks if given parameter is a currency type

import pyvalidator
print(pyvalidator.currency('$4.4'))

equals(str1, str2) -> Checks if given parameters are same

import pyvalidator
print(pyvalidator.equals('testish', 'testish'))

ipv4(ip) -> Checks if given parameter is a valid ipv4 / IP address

import pyvalidator
print(pyvalidator.ipv4('255.255.255.0'))

url(str) -> Checks if given parameter is an url

import pyvalidator
print(pyvalidator.url("https://www.google.com"))

lower(str) -> Checks if given parameter is a lower cased string

import pyvalidator
print(pyvalidator.islower('test'))

md5(str) -> Checks if given parameter is a md5 hash

import pyvalidator
print(pyvalidator.md5('8b1a9953c4611296a827abf8c47804d7'))

number(str / int) -> Checks if given parameter is a number

import pyvalidator
print(pyvalidator.number('1'))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for python-validators, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size python_validators-0.0.1-py3-none-any.whl (5.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size python-validators-0.0.1.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page