Skip to main content

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 to ipify.org.
  • get_ipv6_public(self): Retrieves the public IPv6 address of the machine by connecting to ipify.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

getip-1.0.15.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

getip-1.0.15-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

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

Hashes for getip-1.0.15.tar.gz
Algorithm Hash digest
SHA256 7f86a9a7bdd8a063e15f9f43e47531e1cc05b5b3c130619163c88fb73bf2389a
MD5 7c684c411fcb5d3cbb983fd12ee076ec
BLAKE2b-256 54c3a1161781377a64ac107ced6fd403e534e242c89b21f978fc70dab3b586ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for getip-1.0.15.tar.gz:

Publisher: python-publish.yml on alphaO4/getIP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for getip-1.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 9b823a60ad23611851d66e62070736b6e59e6eca3353d401fcfd25325501f211
MD5 f0ff4e7cfd20e2298823bcee819b2f99
BLAKE2b-256 e04b912b7b262a6244078c5fd47ec64a8d0ef7b35b3ed51e3af9984693e32957

See more details on using hashes here.

Provenance

The following attestation bundles were made for getip-1.0.15-py3-none-any.whl:

Publisher: python-publish.yml on alphaO4/getIP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page