Skip to main content

zencoreipinfo

Get outgoing ip from https://zencore.cn/ipinfo.

Install

pip install zencoreipinfo

Usage in Cli

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

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
aaa.xxx.yy.zz

  1. By default, the program will use the default ipinfo server https://zencore.cn/ipinfo.
  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)
aaa.xxx.yy.zz

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 https://you.site.domain.cn/ipinfo
aaa.xxx.yy.zz

About the ipinfo server of zencore.cn

We do not promise continuity or reliability of the service.

Release

0.1.0

  • First release.

Release files for zencoreipinfo 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zencoreipinfo 0.1.0
File Size Uploaded
zencoreipinfo-0.1.0.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zencoreipinfo 0.1.0
File Interpreter ABI Platform
zencoreipinfo-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.4 kB

Release files / zencoreipinfo-0.1.0.tar.gz

Download URL zencoreipinfo-0.1.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0aaba3b8693dec64b6b734264dd56011fa56d62c67e8e0190c86aabc7b09afb3
BLAKE2b-256 checksum
How to use checksums
ec5fbacfa94687fa8522c8b1add49af83ec0fa753c5119272a251d0ecd8fec76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release files / zencoreipinfo-0.1.0-py3-none-any.whl

Download URL zencoreipinfo-0.1.0-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30c841df25207e119e45f3c5cbe17cb4ce0ec88d8cd3dc1e786d13ae8fc27fd8
BLAKE2b-256 checksum
How to use checksums
2cd30bf5ab32dd500fcb54af0f1ca7077b8c3586bd5e194e487bfad9614c947e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page