A small Package to allow you to get your Local IP
Project description
getIP
The Home of the getIP python package.
GetIP Module
This module provides functionality to retrieve local and public IP addresses (both IPv4 and IPv6) and the hostname of the machine.
Classes
GetIPLogic
Methods
get_ipv4(self): Retrieves the local IPv4 address of the machine.get_ipv6(self): Retrieves the local IPv6 address of the machine (only works on Linux).get_ipv4_public(self): Retrieves the public IPv4 address of the machine by connecting toipify.org.get_ipv6_public(self): Retrieves the public IPv6 address of the machine by connecting toipify.org.
Functions
local(): Returns the local IPv4 address of the machine.localv4(): Returns the local IPv4 address of the machine.localv6(): Returns the local IPv6 address of the machine.public(): Returns the public IPv4 address of the machine.publicv4(): Returns the public IPv4 address of the machine.publicv6(): Returns the public IPv6 address of the machine.hostname(pub=False): Returns the hostname of the machine.
Usage
from getIP import local, localv4, localv6, public, publicv4, publicv6, hostname
# Get local IPv4 address
local_ipv4 = local()
# Get local IPv6 address
local_ipv6 = localv6()
# Get public IPv4 address
public_ipv4 = public()
# Get public IPv6 address
public_ipv6 = publicv6()
# Get hostname
host_name = hostname()
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file getip-1.0.15.tar.gz.
File metadata
- Download URL: getip-1.0.15.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f86a9a7bdd8a063e15f9f43e47531e1cc05b5b3c130619163c88fb73bf2389a
|
|
| MD5 |
7c684c411fcb5d3cbb983fd12ee076ec
|
|
| BLAKE2b-256 |
54c3a1161781377a64ac107ced6fd403e534e242c89b21f978fc70dab3b586ec
|
Provenance
The following attestation bundles were made for getip-1.0.15.tar.gz:
Publisher:
python-publish.yml on alphaO4/getIP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
getip-1.0.15.tar.gz -
Subject digest:
7f86a9a7bdd8a063e15f9f43e47531e1cc05b5b3c130619163c88fb73bf2389a - Sigstore transparency entry: 420381973
- Sigstore integration time:
-
Permalink:
alphaO4/getIP@4ef3827c8510729c3883360071ab01395b89003b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/alphaO4
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4ef3827c8510729c3883360071ab01395b89003b -
Trigger Event:
push
-
Statement type:
File details
Details for the file getip-1.0.15-py3-none-any.whl.
File metadata
- Download URL: getip-1.0.15-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b823a60ad23611851d66e62070736b6e59e6eca3353d401fcfd25325501f211
|
|
| MD5 |
f0ff4e7cfd20e2298823bcee819b2f99
|
|
| BLAKE2b-256 |
e04b912b7b262a6244078c5fd47ec64a8d0ef7b35b3ed51e3af9984693e32957
|
Provenance
The following attestation bundles were made for getip-1.0.15-py3-none-any.whl:
Publisher:
python-publish.yml on alphaO4/getIP
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
getip-1.0.15-py3-none-any.whl -
Subject digest:
9b823a60ad23611851d66e62070736b6e59e6eca3353d401fcfd25325501f211 - Sigstore transparency entry: 420381984
- Sigstore integration time:
-
Permalink:
alphaO4/getIP@4ef3827c8510729c3883360071ab01395b89003b -
Branch / Tag:
refs/heads/main - Owner: https://github.com/alphaO4
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@4ef3827c8510729c3883360071ab01395b89003b -
Trigger Event:
push
-
Statement type: