Skip to main content

Python Library for cloudflare analytics web

Project description

Cloudflare Analytics – Because You Need More Graphs 📊

Ever wondered what Cloudflare thinks is happening on your website? This incredibly "advanced" tool helps you fetch analytics data using Cloudflare's GraphQL API—because who doesn’t love GraphQL, right? Now you can almost understand your website traffic, security threats, and performance (with a pinch of optimism).

🚀 Features (Because Everything Needs Bullet Points)

  • 📊 Pulls data straight from Cloudflare's GraphQL API (yes, GraphQL, because REST is so last decade)
  • 🔍 Gives you traffic insights, but only if Cloudflare decides to cooperate
  • 📈 Shows security metrics—so you can see all those "bad" IPs doing "bad" things
  • ⚡ Lightweight, just like your trust in Cloudflare’s analytics

📦 Installation (Because Nothing is Easy)

Clone this glorified data-fetcher and install some dependencies:

# Clone the magical repo
git clone https://github.com/k1m0ch1/cloudflare-analytics.git
cd cloudflare-analytics

# Install the spell components
pip install -r requirements.txt

🔧 Configuration (Enter Your API Token… If You Dare)

Create a .env file and provide your oh-so-secure Cloudflare API token:

CLOUDFLARE_API_TOKEN=your_api_token_here

If your token gets leaked, don’t worry—Cloudflare probably already knew about it.

🚀 Usage (Let’s See What Cloudflare Wants You to See)

Run this beauty and behold the data:

python analytics.py

Example output (or an error message, who knows?):

Fetching Cloudflare analytics data...
Total Requests: 120,345 (or whatever Cloudflare decides)
Unique Visitors: 54,678 (probably bots)
Threats Blocked: 1,234 (but not that one shady IP)
...

🛠 API Reference (A.k.a. "Read the Docs")

This tool "leverages" Cloudflare’s GraphQL API, which you can tweak in analytics.py. Or just pretend you understand GraphQL by checking out Cloudflare’s GraphQL API Docs.

📜 License (Because Lawyers Demand It)

This project is licensed under the MIT License—so do whatever you want with it. Just don’t blame us if Cloudflare changes everything overnight.

🤝 Contributing (No, Really, Please Help)

Want to make this better? Great! Open an issue, submit a pull request, or just scream into the void.

📬 Contact (If Cloudflare Didn’t Block Me Yet)

Got questions, complaints, or just need someone to blame? Reach out to @k1m0ch1 or open an issue.


🚀 Cloudflare Analytics – Because Staring at Graphs Makes You Feel Productive!

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

cfmetrics-0.2.1.tar.gz (10.0 kB view details)

Uploaded Source

File details

Details for the file cfmetrics-0.2.1.tar.gz.

File metadata

  • Download URL: cfmetrics-0.2.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for cfmetrics-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1f136dc9d623786999e6569a723f5feee81d133f856a519a80cb583c5ec6e05b
MD5 ad8352777ab540f6c9a1b85bb9d515a3
BLAKE2b-256 280e43ab480ed11d0b8695c63663bdce9c521958303da49c4dc02240b72cb343

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