Getting your public IP v4 and v6
Project description
Intro
Simple python module for getting your public IP V4 and V6 with several providers support. The following one are supported:
- Google (DNS)
- Cloudflare (DNS)
- OpenDNS (DNS)
- Akamai (HTTP)
Installation
This module can be installed from pypi website
pip install publicaddr
Usage
import publicaddr
publicaddr.getall()
{'ip4': 'x.x.x.x', 'ip6': 'x:x:x:x:x:x:x:x'}
Provider
import publicaddr
from publicaddr import PROVIDER_GOOGLE, PROVIDER_OPENDNS, PROVIDER_CLOUDFLARE, PROVIDER_AKAMAI
publicaddr.getall(PROVIDER_AKAMAI)
{'ip4': 'x.x.x.x', 'ip6': 'x:x:x:x:x:x:x:x'}
For developpers
Run test units
python3 -m unittest -v discover tests/
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
publicaddr-0.1.0.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for publicaddr-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c57de223788481a4936e572d7ae7262831f18cceab8e0a30900e3eef67bb96b9 |
|
MD5 | 653d4bb8f9273317c41da8a4c13a6a1b |
|
BLAKE2b-256 | b8525da4381ce5c82c284463da96b85b2be8ae496072ef489fac5abe302718b0 |