Skip to main content

根据ip获取地址信息

Project description

===================
ip_info:获取ip信息
===================

描述:
当前最右会对用户ip进行地域识别,在敏感时期可能会对某些特定的地区、省份、国家的ip做特殊的标记处理。

说明:
当前此项目用到了ipip上的免费版ip鉴定本地包,对于无法鉴定的ip再用淘宝ip免费ip鉴定接口加以辅助。

使用:
from xc_ip_info.ip_info import IPSearcher
IPSearcher.search('123.125.71.38')
IPSearcher.validate('61.128.101.255')
即可,具体case可以见test下测试用例。

安装:
用的是最内内部的私有pip服务器。因此需要在内网环境下安装。
第一次:sudo pip install xc_ip_info -i 'http://172.16.111.203:8081' --trusted-host '172.16.111.203'
之后:sudo pip install --upgrade xc_ip_info -i 'http://172.16.111.203:8081' --trusted-host '172.16.111.203'
回滚到某个版本:sudo pip install xc_ip_info==0.5 -i 'http://172.16.0.173:8080' --trusted-host '172.16.0.173'
查看所有版本信息的web前端访问:http://172.16.0.173:8080

上传:
1.首先需要获取你的私有pypi账户和密码,可以找op权洲。
2.修改你的~/.pypirc,最简单的包括如下几行:
[distutils]
index-servers =
local
[local]
repository: http://172.16.0.173:8080
username: yourname
password: yourpassword
3.构建:python setup.py sdist build
4.上传:python setup.py sdist upload -r local

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

xc_ip_info-0.4.tar.gz (7.4 MB view details)

Uploaded Source

File details

Details for the file xc_ip_info-0.4.tar.gz.

File metadata

  • Download URL: xc_ip_info-0.4.tar.gz
  • Upload date:
  • Size: 7.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for xc_ip_info-0.4.tar.gz
Algorithm Hash digest
SHA256 9e1016a11bd83f1611ab497f2da1c1c0b76080c9167953fcf771b6cc2424f561
MD5 8522fed643a276824e37623b2be138cc
BLAKE2b-256 14940104f105e1e6599f58758828d174f1749c66e00f9f8d9126af4bc45b3b4b

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