Skip to main content

A simple Python library and CLI tool to show your public internet IP address.

Project description

publickipbitan

Developer: Bitan Bhattachirjee
Email: mr.bitanbhattachirjee@gmail.com

publickipbitan is a simple Python library and command-line tool that shows your public internet IP address.

Installation

pip install publickipbitan

Use as Python library

import publickipbitan

ip = publickipbitan.get_public_ip()
print("My public IP is:", ip)

Use as command-line tool

publickipbitan

JSON output

publickipbitan --json

Example output:

{
  "public_ip": "203.0.113.10",
  "ip_version": "IPv4"
}

Features

  • Shows public internet IP address
  • Works from Python code
  • Works from terminal / CMD
  • Supports JSON output
  • Uses Python standard library only
  • Uses multiple public IP services as fallback
  • Validates IPv4 and IPv6 output

Developer

Created by Bitan Bhattachirjee
Email: mr.bitanbhattachirjee@gmail.com

License

MIT License

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

publickipbitan-1.0.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

publickipbitan-1.0.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file publickipbitan-1.0.0.tar.gz.

File metadata

  • Download URL: publickipbitan-1.0.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for publickipbitan-1.0.0.tar.gz
Algorithm Hash digest
SHA256 de159a1a6c91a6617e7ba024c60672c1fdf7f54183cc67811e0c5e9024ea86b0
MD5 3b9a07f159e534c0e98ee767851bdbde
BLAKE2b-256 f60d4b1c8373026705edc8a529538397f3ce27af5eb2045f79c9e0bf1f7a4c46

See more details on using hashes here.

Provenance

The following attestation bundles were made for publickipbitan-1.0.0.tar.gz:

Publisher: publish.yml on techbitan/publickipbitan

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

File details

Details for the file publickipbitan-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: publickipbitan-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for publickipbitan-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 120410a4241276d24fde61aeaadb583cc059dd15819481557059a625d85c7796
MD5 85daa42143d8312829151c0a270c82a8
BLAKE2b-256 7eceec56305f8a73254e67bab562c3a891b9cd0302d17430227b6129de859dc3

See more details on using hashes here.

Provenance

The following attestation bundles were made for publickipbitan-1.0.0-py3-none-any.whl:

Publisher: publish.yml on techbitan/publickipbitan

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