Skip to main content

ipman is a high-level core python package for Internet Protocol(IP) manipulations.

Project description

IPToolz

IPToolz is a high-level core python package for Internet Protocol(IP) manipulations and network planning tool.

Installation

 pip install IPToolz

Helper Functions

>> import IPToolz
>> dir(IPToolz)

['CBit', 'HexConversionError', 'IPSegmentError', 'IPToolz', 'IPType', 'IPValueError', 'InvalidIPError', 'InvalidIPRangeError', 'Toolz', 'UnrecognisedIPError', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'binary', 'decimal', 'getIP', 'getlocal', 'hexadecimal', 'isIPV4', 'isIPV6', 'octet']

Usage

from IPToolz import X
#e.g. 
from IPToolz import isIPV4
#or 
from IPtoolz import *

getlocal

This return device localhost ip address.

>> from IPToolz import getIP
>> getlocal()
127.0.0.1

getIP

This returns the ip address of a given url.

>> from IPToolz import getIP
>> getIP('www.google.com')
x.x.x.x

IPType

This returns the ip address of a given url.

>> from IPToolz import IPType
>> IPType('x.x.x.x')
IPV-4

isIPV4

This returns the ip address of a given url.

>> from IPToolz import isIPV4
>> isIPV4('x.x.x.x')
('x.x.x.x', True)

isIPV6

This returns the ip address of a given url.

>> from IPToolz import isIPV6
>> isIPV6('x:x:x::x')
('x.x.x.x.x.x.x.x', True)

Others

>> #Conversion from decimal to binary
>> binary(10)
1010
>>
>> #Conversion from decimal to hexadecimal
>> hexadecimal(170)
1010A
>>
>> #Conversion from decimal to octet
>> octet(10)
12

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

ipman-1.1.1.1.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

ipman-1.1.1.1.0-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

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