An open API service indexing awesome lists of open source software.

https://github.com/lwzm/cz-ip


https://github.com/lwzm/cz-ip

chunzhen cz88 ip ipaddress ipv4 location

Last synced: 7 months ago
JSON representation

Awesome Lists containing this project

README

          

# 查 ip 所在位置, 查找速度还行(微秒级), 数据来自纯真数据库.

### Install
```
pip install cz-ip
```

### Usage

```
>>> import cz_ip
>>> cz_ip.locate("8.8.8.8")
'美国 加利福尼亚州圣克拉拉县山景市谷歌公司DNS服务器'
```

```
$ python -m cz_ip
114.114.114.114
114.114.114.114 江苏省南京市 南京信风网络科技有限公司GreatbitDNS服务器
```

```
$ cat ips.txt
114.114.114.114
172.16.16.16
10.0.0.1
10.0.0.2

$ python -m cz_ip