Skip to main content

一个可以获取ip地址的Python库

Project description

介绍

这是一个Python库,它可以查看当前的IP地址

获取iPv4地址

import cniptest
print(cniptest.ip())

获取ipv6地址

import cniptest
print(cniptest.ipv6())

检测是否有ipv6,如果有那么就返回ipv6,如果没有就返回iPv4

import cniptest
print(cniptest.test())

获取北京出口ipv4地址

import cniptest
print(cniptest.bjv4())

获取北京出口ipv6地址

import cniptest
print(cniptest.bjv6())

获取南京出口ipv4地址

import cniptest
print(cniptest.njv6())

获取南京出口ipv4地址

import cniptest
print(cniptest.njv6())

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

cniptest-3.0.1.tar.gz (1.8 kB view hashes)

Uploaded Source

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