Skip to main content

Cloudflare URL Scanner SDK

Project description

Cloudflare URL Scanner PY-SDK

Python SDK for the Cloudflare URL Scanner API. It provides a simple way to interact with the API and scan URLs for malware, phishing, and more. Read more about the Cloudflare URL Scanner API here.

[!NOTE] This SDK is not an official Cloudflare product.

Installation

You can install the SDK using pip:

pip install cloudflare-url-scanner

or from github:

python -m pip install -U git+https://github.com/alexraskin/cloudflare-url-scan

or from source:

git clone
cd cloudflare-url-scan
python -m pip install .

Usage

from cloudflare_scan import UrlScannerClient


cf_client = UrlScannerClient(
    cloudflare_api_key="", #or set the environment variable CLOUDFLARE_API_KEY
    cloudflare_account_id="", #or set the environment variable CLOUDFLARE_ACCOUNT_ID
)

# Scan a URL
scan = cf_client.scan("example.com")

# Get the scan result
result = scan.result

# Get the UUID of the scan
uuid = scan.uuid

# Get the screenshot of the scan
screenshot = cf_client.get_screen_shots(uuid, resolution="desktop")

# Get the HAR file of the scan
har = cf_client.get_har(uuid)

# Get the scan by UUID
scan = cf_client.get_scan(uuid)

# Search for a scan by hostname
scan = cf_client.search("example.com")

# Get the scan result
result = scan.result

# Get the json response
json = scan.json

# Get the text response
text = scan.text

# Get the status code
status_code = scan.status_code

License

MIT

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

cloudflarescan-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

cloudflarescan-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file cloudflarescan-0.1.0.tar.gz.

File metadata

  • Download URL: cloudflarescan-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for cloudflarescan-0.1.0.tar.gz
Algorithm Hash digest
SHA256 29178952763b7e372b58a4bf83f4f0b0124dd67e8f6aa65c8c11592462cb856b
MD5 71fed2e8d027fd550a2b5a93a5fbf190
BLAKE2b-256 c67c291d3e4fc1ad4fd93f69d796f64c1b06394efd1d9ca9e6c73319d113da4c

See more details on using hashes here.

File details

Details for the file cloudflarescan-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cloudflarescan-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c5206fb5dbbfa1918e63ebf4ff274a9f0d728978b244e190c5a6344eea7f5e4
MD5 4e8c70f421478eb0431bf4981f45ffad
BLAKE2b-256 bb1ed85219070f09406a39b94df4536df53a8485e2b70b6bf72d7d62cb12cac3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page