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
Release history Release notifications | RSS feed
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de159a1a6c91a6617e7ba024c60672c1fdf7f54183cc67811e0c5e9024ea86b0
|
|
| MD5 |
3b9a07f159e534c0e98ee767851bdbde
|
|
| BLAKE2b-256 |
f60d4b1c8373026705edc8a529538397f3ce27af5eb2045f79c9e0bf1f7a4c46
|
Provenance
The following attestation bundles were made for publickipbitan-1.0.0.tar.gz:
Publisher:
publish.yml on techbitan/publickipbitan
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
publickipbitan-1.0.0.tar.gz -
Subject digest:
de159a1a6c91a6617e7ba024c60672c1fdf7f54183cc67811e0c5e9024ea86b0 - Sigstore transparency entry: 1852361473
- Sigstore integration time:
-
Permalink:
techbitan/publickipbitan@3d9a5dae796e3cf141158150581efd317f922bcb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/techbitan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3d9a5dae796e3cf141158150581efd317f922bcb -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
120410a4241276d24fde61aeaadb583cc059dd15819481557059a625d85c7796
|
|
| MD5 |
85daa42143d8312829151c0a270c82a8
|
|
| BLAKE2b-256 |
7eceec56305f8a73254e67bab562c3a891b9cd0302d17430227b6129de859dc3
|
Provenance
The following attestation bundles were made for publickipbitan-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on techbitan/publickipbitan
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
publickipbitan-1.0.0-py3-none-any.whl -
Subject digest:
120410a4241276d24fde61aeaadb583cc059dd15819481557059a625d85c7796 - Sigstore transparency entry: 1852361545
- Sigstore integration time:
-
Permalink:
techbitan/publickipbitan@3d9a5dae796e3cf141158150581efd317f922bcb -
Branch / Tag:
refs/heads/main - Owner: https://github.com/techbitan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3d9a5dae796e3cf141158150581efd317f922bcb -
Trigger Event:
workflow_dispatch
-
Statement type: