Skip to main content

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 and capable of roughly 100,000 lookups per second regardless of the size of the database.

Used by:

Installation (PyPi)

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


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.9.tar.gz (85.7 kB view details)

Uploaded Source

Built Distribution

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

radixtarget-1.0.0.9-py3-none-any.whl (86.2 kB view details)

Uploaded Python 3

File details

Details for the file radixtarget-1.0.0.9.tar.gz.

File metadata

  • Download URL: radixtarget-1.0.0.9.tar.gz
  • Upload date:
  • Size: 85.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.19

File hashes

Hashes for radixtarget-1.0.0.9.tar.gz
Algorithm Hash digest
SHA256 a4b54b207e176bcd0eac5f9bddc3b8fc2ea0711cf6345c9383d026c859e99ce5
MD5 c8cb0bc6bdc50708748a5d9308d1c3f1
BLAKE2b-256 58ca070d3038d2ebb93776b68744ad7473ac94290ffaf402fba84219e0ed81ce

See more details on using hashes here.

File details

Details for the file radixtarget-1.0.0.9-py3-none-any.whl.

File metadata

  • Download URL: radixtarget-1.0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 86.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.19

File hashes

Hashes for radixtarget-1.0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 d59b13d717107edad739ae19924b0393e8d50ecff0843dd305936ccc57b4ae00
MD5 e628b3cad9aed9e383e733901259d28f
BLAKE2b-256 e84aa5a602d64b12b3c408a1580ef7ee18d05018a4797b4059473e12b209bb06

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