Skip to main content

IPv4 Destination Query

Project description

ipdatacloud

官网

ip查询 ipv4查询 ipv6查询

用于识别国家、地区、城市、经纬度、邮政编码、时区、连接速、ISP、区号、气象站数据、区号气象数据、、移动运营商、海拔等。

  1. 编码:UTF8 字节序:Little-Endian
  2. 性能:每秒解析1000w+ 查询非常快
返回字符串

洲|国家|省份|城市|区县|运营商|区域代码|国家英文|国家英文简写|经度|纬度|海拔|邮编|城市代码|气象站|ASN码|预留|街道|时区

技术咨询及免费试用请添加微信

技术咨询及免费试用请添加微信

使用方式

缓存 VectorIndex 索引

提前从文件中加载出来 VectorIndex 数据.

from ipdatacloud.ip import Ip

def searchWithContent():
    # 1. 预先加载整个 xdb
    filePath = your_Path;
    file = Ip(filePath=filePath)
    
    # 2. 执行查询
    ip = "1.2.3.4"
    ip_search = file.get(ip)
    
    print(ip_search)

缓存整个 文件

我们也可以预先加载整个文件的数据到内存,然后基于这个数据创建查询对象来实现完全基于文件的查询

from ipdatacloud.ip import Ip

def searchWithContent():
    # 1. 预先加载整个 xdb
    filePath = your_Path;
    file = Ip(filePath=filePath,method='content')
    
    # 2. 执行查询
    ip = "1.2.3.4"
    ip_search = file.get(ip)
    
    print(ip_search)

输入 ip 即可进行查询测试。也可以分别设置 method 为 vectorIndex/content 来测试两种不同缓存实现的效率。

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

ipdatacloud-1.0.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipdatacloud-1.0.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file ipdatacloud-1.0.2.tar.gz.

File metadata

  • Download URL: ipdatacloud-1.0.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for ipdatacloud-1.0.2.tar.gz
Algorithm Hash digest
SHA256 caa3334d88283abf2d12bc85386721547921ee232d6f9e7a3a5582d615cf8d9f
MD5 b8cdaf6dae3ab4e4facf293315b0f28d
BLAKE2b-256 2a207ce4e5562e7f6eb8140d74ae3d220c371779daecb0fea685ce1a3497a8de

See more details on using hashes here.

File details

Details for the file ipdatacloud-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: ipdatacloud-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for ipdatacloud-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f64f65eda12d57e975d73ba3e633c7470b8d240f42cefcb4b480dfba1f50305b
MD5 1cb4724ec0f75469eb81356c77100c98
BLAKE2b-256 2e0974f5f3352e19029970a17175440efa18f0e301ceaae0d22d43ca483d78ed

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