Skip to main content

Get outgoing ip from

Project description


Get outgoing ip from


pip install zencoreipinfo

Usage in Cli

test@test zencoreipinfo % ipinfo --help
Usage: ipinfo [OPTIONS]

  --url TEXT   Server url. Can apply multiple times.
  -q, --quiet  Don't show error information.
  --help       Show this message and exit.

test@test zencoreipinfo % ipinfo

  1. By default, the program will use the default ipinfo server
  2. We ship cli program in name ipinfo, and zencoreipinfo as it's alias.

Usage in Script

In [1]: from zencoreipinfo import get_outgoing_ip

In [2]: ip = get_outgoing_ip()

In [3]: print(ip)

How to implement self ipinfo server?

You need a linux server with a public ip address, and you need to install nginx service on the linux server. Add the ipinfo location into your site.

# your other configs

location /ipinfo {
    add_header Content-Type text/plain;
    return 200 $remote_addr;

# your other configs

After you setup your ipinfo server. Run the ipinfo command with --url prarameter.

test@test zencoreipinfo % ipinfo --url

About the ipinfo server of

We do not promise continuity or reliability of the service.



  • First release.

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

zencoreipinfo-0.1.0.tar.gz (3.7 kB view hashes)

Uploaded source

Built Distribution

zencoreipinfo-0.1.0-py3-none-any.whl (3.8 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page