Skip to main content

Syntax validator for email, hostname, url, uri and ip address, compliant to RFC specifications

Project description

What is this?

Syntax validator compliant to RFC specifications for

  • Email
  • Hostname
  • URL
  • URI
  • IPv4 and IPv6
  • Mac address

Installation

This module can be installed from pypi website

pip install checkifvalid

Checking IPv4 or IPv6 syntax

import checkifvalid

checkifvalid.ipv6_address("::1")
True

checkifvalid.ipv4_address("127.0.0.1")
True

checkifvalid.ipv4_address("127.0.0.257")
False

Checking URL syntax

import checkifvalid

checkifvalid.url("https://www.google.com")
True

Other syntax validator

import checkifvalid

checkifvalid.email("john.doe@example.com")
True

checkifvalid.uri("sip:support@john.doe:443",)
True

checkifvalid.mac_address("00:11:22:33:44:55")
True

checkifvalid.hostname("john@doe")
False

For developpers

Run test units

python3 -m unittest discover tests/ -v

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

checkifvalid-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

checkifvalid-0.1.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file checkifvalid-0.1.0.tar.gz.

File metadata

  • Download URL: checkifvalid-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for checkifvalid-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2988c7f6e59879d302510fa2104fd803e352230c869f62cdb1fa01e2426d56e6
MD5 351d8d9882dda405cfaff570cd1ee54b
BLAKE2b-256 943d8a1a161d3e1242f786450beb0f021ffe20dba74b08c152167dabae8b60f7

See more details on using hashes here.

File details

Details for the file checkifvalid-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for checkifvalid-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e8465f8e14ab85f722213e1d81e398d35528263175b640434ef9083859d2a67
MD5 7291bc990aeaabe376acbb4aaa9c819f
BLAKE2b-256 1f593e3841ba9faf59e348fbf3913f188f47ff137d85ab95e35175f9c920d088

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