Skip to main content
Join the official 2020 Python Developers SurveyStart the survey! IP address geolocation database Python library

Project description

Description IPv4 地址归属地数据库 Python 查询库。同时支持 dat 与 datx 格式的数据文件,支持 Python 2 与 3。 需要先去 官方网站 下载数据文件。

性能较官方库为高,在 E5-2682 2.5GHz 下 QPS 约为 490k。


>>> from pyipip import IPIPDatabase
>>> db = IPIPDatabase('/path/to/your/ipipdb.dat')
>>> db.lookup('')


pip install pyipip

Test & Benchmark

make test
make bench



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyipip, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size pyipip-0.1.1-py2.py3-none-any.whl (5.4 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size pyipip-0.1.1.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page