Socket
Socket
Sign inDemoInstall

checkifvalid

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

checkifvalid

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


Maintainers
1

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

Keywords

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc