No project description provided
Project description
Introduction
This project provides IP range data of multiple CDN vendors via a Python package named cdnmon
.
Installation
pip install -i https://pypi.org/simple/ cdnmon
Usage
List all supported CDNs
import cdnmon
endpoint = cdnmon.Endpoint(access_token="")
cdns = endpoint.list_cdns()
Find a CDN
import cdnmon
endpoint = cdnmon.Endpoint(access_token="")
cdn = endpoint.find_cdn(name="cloudflare")
print(cdn)
Get the IP ranges of a specific CDN
import cdnmon
endpoint = cdnmon.Endpoint(access_token="")
cdn = endpoint.find_cdn(name="cloudflare")
latest_ipv4_networks = cdn.ipv4_networks[-1]
for latest_ipv4_network in cdn.latest_ipv4_networks:
print(latest_ipv4_network.networks)
print(latest_ipv4_network.updated_at)
print(latest_ipv4_network.source)
FAQ
How to obtain an access token?
Please contact wangyihanger@gmail.com.
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
cdnmon-0.2.5.tar.gz
(1.6 kB
view hashes)
Built Distribution
cdnmon-0.2.5-py3-none-any.whl
(2.2 kB
view hashes)