Skip to main content

IPToolz 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.

Installation

 pip install IPToolz

Helper Functions

>> import IPToolz
>> dir(IPToolz)

['IPType', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'binary', 'decimal', 'getIP', 'getlocal', 'hexadecimal', 'ip', 'isIPV4', 'isIPV6', 'mb', 'octet', 'web']

Usage

from IPToolz import X
#e.g. 
from OPToolz 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

IPToolz-1.1.0.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file IPToolz-1.1.0.tar.gz.

File metadata

  • Download URL: IPToolz-1.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.4

File hashes

Hashes for IPToolz-1.1.0.tar.gz
Algorithm Hash digest
SHA256 075940aa924a10d6b8ee0d08a30d937bd7f9a00e93681d8e484902beeb65faac
MD5 32c52b97ffd5446e932b16341e9560cd
BLAKE2b-256 02d4e8a597e03d9ad89c833a9ae1f9f697abd97a576e20462e921368722afde2

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 Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page