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 IPV4Find

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

缓存整个 文件

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

from ipdatacloud.ip import IPV4Find

def searchWithContent():
    # 1. 预先加载整个 xdb
    filePath = your_Path;
    file = IPV4Find(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.3.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.3-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ipdatacloud-1.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 1181fbf3e4e1d145747970df81e7b14dbd85dc0d5a9d7f5fe468a02c542c4b23
MD5 4bef1208c87599b5e0dc8d15130738e8
BLAKE2b-256 2ad83e27314b4d7fc86121b0710791a338bd324572157f6ee6f170a5c4d04224

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ipdatacloud-1.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 58ae6c3c2406351f168853db0a481a0d61d10c1b1e9ccc1d773991f5754f5cb6
MD5 149632a9985360a33d3e766cfadfb52f
BLAKE2b-256 22e9b68d6b36fdd735b75d256e5dea4c873feb975f9ce81d8f4cf1877c8fc7b3

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