Skip to main content

myIPaddress 🌎

Module Overview:

This module provides functionality to fetch IP information, including public and private IP addresses, location details, open ports, and more.

How to Use:

  • myIPaddress.{function_name}()

Public IP:

  • .info - Returns all public information in JSON format.

  • .public_ip() - Returns the public IP address.

  • .public_hostname() - Returns the public hostname.

  • .public_city() - Returns the public city.

  • .public_region() - Returns the public region.

  • .public_country() - Returns the public country.

  • .public_loc() - Returns the public location.

  • .public_organization() - Returns the public organization.

  • .public_postal() - Returns the public postal code.

  • .public_fulladdress() - Returns a formatted string of public city, region, country, and postal code.

  • .public_timezone() - Returns the public timezone.

Private IP:

  • .private_ip() - Returns the private IP address.

Other Networking Information:

  • .open_ports() - Returns a list of open ports on the local machine.

  • .ip_probe(ip_address, indent=False) - Retrieves IP information for a specified IP address using the "https://ipinfo.io/{ip_address}/json" API.

Example Usage:

Example:

import myIPaddress as myip

ip_info = myip.public_ip()
print(f"Public IP Address: {ip_info}")

Output:

Public IP Address: 8.8.8.8

Metadata

Release files for myipaddress 1.0.2

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

Source distribution (sdist)

Source distribution for myipaddress 1.0.2
File Size Uploaded
myipaddress-1.0.2.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for myipaddress 1.0.2
File Interpreter ABI Platform
myipaddress-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.0 kB

Release files / myipaddress-1.0.2.tar.gz

Download URL myipaddress-1.0.2.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b58c431f22a905e5f8f1873dbd753c2a0173fe07934d9fa6daf0ddbfaf929fbc
BLAKE2b-256 checksum
How to use checksums
aa9e9982b7d841715f83b55a458079354cf58a9f5383dc7cd98ce32c9aba1e12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / myipaddress-1.0.2-py3-none-any.whl

Download URL myipaddress-1.0.2-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c27efcbfe4b8c43a9809631bb5bf10dba6c61f672d1f4941546340c7d98c07d
BLAKE2b-256 checksum
How to use checksums
68e8c34ba7a68dbe0cb0c0193d60c74db95ed7d81f1c794589650229e5ddc657
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0

2 release files

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