Skip to main content

print the external ip address (v4 or v6)

Project description

getmyip46 - Get My External IP Address

Retrieve the external ipv4 and/or ipv6 IP address

getmyip Command Usage and Options

Install with pip:

% pip install gitmyip46
% getmyip -h

usage: app.py [-h] [-v] [-4] [-6]

Report external IP address

options:
  -h, --help     show this help message and exit
  -v, --version  show program's version number and exit
  -4, --ipv4     Find public IPv4 address (default)
  -6, --ipv6     Find public IPv6 address

getmyip gunville 2024 v1

Method of IP address detection:

By default getmyip automatically detects the public IP address by sending an HTTP request to ipv4.icanhazip.com for IPv4. and ipv4.icanhazip.com for IPv6.

You can optionally use a different site to autodetect the public ip by setting the environment variable IPAPIURL to that URL:

% IPAPIURL='http://api.ipify.org'
% getmyip

You can do the same for IPv6 using the IPV6APIURL environment variable.

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

getmyip46-24.12.28.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

getmyip46-24.12.28-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file getmyip46-24.12.28.tar.gz.

File metadata

  • Download URL: getmyip46-24.12.28.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for getmyip46-24.12.28.tar.gz
Algorithm Hash digest
SHA256 2a8f4f5ddaaf37edbcf58ff7d195fc26966535e987851ad7802775ec0f286388
MD5 bfb3d13c18a3245bc05dcfaa8c13b6fe
BLAKE2b-256 c2a298109796210925226f9b6f8c8d841e9670cacf6825daf455a1cc92847a83

See more details on using hashes here.

File details

Details for the file getmyip46-24.12.28-py3-none-any.whl.

File metadata

  • Download URL: getmyip46-24.12.28-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for getmyip46-24.12.28-py3-none-any.whl
Algorithm Hash digest
SHA256 53dbd132df94896cac1bedf75a6b3c8f025019672fcd17de9807b2ea759d9fb8
MD5 fd4dd8e4b3bac4768894994c1dbc2879
BLAKE2b-256 3ccc6213ff2ea68591cae9d3605f71530c4a28aed7f444394a9e4cff0c9f4547

See more details on using hashes here.

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