Skip to main content
##################################
__Program__: IPChecker
__version__: 1.2.0
__Author__ : Boumediene Kaddour
__Country__: Algeria
##################################

IPChecker is a tiny Python library that is used to check if an IP version address is Private, Public or Invalid,
The library returns Booleans and contains a couple of methods summurized as follows:

isValid(): This method returns True, if a valid IPv4's given, otherwise, it returns False.
isPrivate(): This little method returns True if the given IP is private, otherwise, False is returned.
isMCast(): This little method returns True, if a Valid IPv4 is given and it's among the multicast ip range, otherwise, it returns a False.
isPublic(): This little method returns True if the given IP is a Valid IPv4, not private and not multicast address, otherwise, False is returned.

Usage:
>>> from IPChecker import IPChecker
>>> obj = IPChecker("172.16.122.254")
>>> obj.isValid()
>>> True
>>> obj.isPrivate()
>>> True
>>> obj.isMCast()
>>> False
>>> obj.isPublic()
>>> False

Here is a sample grabbed from the IPchecker source code given as an example of how you can checkout for a valid IPv4 address using regular expressions.

in this example, the built-in python re module is used.

>>> def isValid(self):
>>> ____if findall( "(?i)^(\d|\d\d|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).(\d|\d\d|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).(\d|\d\d|1[0-9][0-9]|2[0-4][0-9]|25[0-5]).(\d|\d\d|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$" ,self.IP):
>>> ________ return True
>>> ____else:
>>> ________ return False

Release files for IPChecker 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for IPChecker 1.2.0
File Size Uploaded
IPChecker-1.2.0.tar.gz 1.6 kB Details

Release files / IPChecker-1.2.0.tar.gz

Download URL IPChecker-1.2.0.tar.gz
Size 1.6 kB
Tags Source
SHA-256 checksum
How to use checksums
82c8c569d6b396ba33af4cd0a91aaf31841f2bb52351814c56d510a59d9d7f80
BLAKE2b-256 checksum
How to use checksums
b03c0327dabf12c612d3f07795eb374d856532bb25c027d4cdae1a40a5b6cb95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.2.0 This release

1 release file

1.2

1 release file

1.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page