Check whether an IP address belongs to a cloud provider
Project description
RadixTarget
RadixTarget is a performant radix implementation designed for quick lookups of IP addresses/networks and DNS hostnames. Written in pure python.
Used by:
Speed Benchmark
Installation
pip install radixtarget
Example Usage
from radixtarget import RadixTarget
rt = RadixTarget()
# IPv4
rt.insert("192.168.1.0/24")
rt.search("192.168.1.10") # ipaddress.ip_network("192.168.1.0/24")
rt.search("192.168.2.10") # None
# ipv6
rt.insert("dead::/64")
rt.search("dead::beef") # ipaddress.ip_network("dead::/64")
rt.search("dead:cafe::beef") # None
# DNS
rt.insert("net")
rt.insert("www.example.com")
rt.insert("test.www.example.com")
rt.search("net") # "net"
rt.search("evilcorp.net") # "net"
rt.search("www.example.com") # "www.example.com"
rt.search("asdf.test.www.example.com") # "test.www.example.com"
rt.search("example.com") # None
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
radixtarget-1.0.0.7.tar.gz
(85.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file radixtarget-1.0.0.7.tar.gz.
File metadata
- Download URL: radixtarget-1.0.0.7.tar.gz
- Upload date:
- Size: 85.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fb2685a305d93e94ebbc38c0a46f25ba81fd73d3359a670a1f94beb5ef10b1c
|
|
| MD5 |
b056db8c659e7f5753540f404124c5a7
|
|
| BLAKE2b-256 |
7efeb6d9cb55679f8fbbf4c736e1ff5b338024f60ee14949b332522f5d6e1023
|
File details
Details for the file radixtarget-1.0.0.7-py3-none-any.whl.
File metadata
- Download URL: radixtarget-1.0.0.7-py3-none-any.whl
- Upload date:
- Size: 86.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ea447435f21c686af16df93c615d9032b1f3392ebf2c578719c18adc63a214c
|
|
| MD5 |
5a1a46b12b036b689e2f7c5346a7482b
|
|
| BLAKE2b-256 |
1d7ce3350e0a4d3f6e538fa078c1cd7812f5ff83872f838d336b0f60fff7dfa8
|