Skip to main content

Python Library for cloudflare analytics web

Project description

Cloudflare Analytics

    I just effing annoyed with the metric retention in cloudflare, and the data is actually depend plan you are using, I know cloudflare have graphql so you could get all the metric all you want (within you pricing plan), but I want to make it simple, you see when you get to Web Analytics or Traffic menu in cloudpeler that the data what I want to take it, so this library is just simply imitate what the dashboard cloudpeler do.
    
    ## How to Install
    
    `pip install cfanalytics`
    
    and to use
    
    ```
    from cfanalytics import Auth
    
    cf = Auth(CF_API_KEY, CF_API_EMAIL)
    zone = cf.Account(CF_ACCOUNT_ID).Zone(CF_ZONE_ID)
    
    # Here is the available function
    
    # to get all A and CNAME records
    getDNSRecord = zone.get_dns_records()
    
    # Data Overview
    getDataOverview = zone.get_overview()
    
    # Domain plan
    getDomainPlan = zone.get_domain_plan()
    
    # Web Analytics 
    # by default it will take 32 days ago from today
    getWebAnalytics = zone.get_web_analytics()
    
    # HTTP Traffic
    # by default it will take 32 days ago from today
    # This only available for Business plan
    getHttpTraffics = zone.get_traffics()
    
    ```
    
    ## License
    
    This Project is licensed under the GNU Affero General Public License v3 (AGPL v3)
    See the [LICENSE](LICENSE) file for details

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

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for cfmetrics-0.1.3.tar.gz
Algorithm Hash digest
SHA256 4cfeb907d3f36b56e6cd1c8a361790b49d853e9f48a4fc158d7dd573ddcdc285
MD5 c1ec3a427226550f88d0f3cd1056743d
BLAKE2b-256 1cd7e1d4ae2a6ebe0ca739955410915301632e02e28303e64f6382031c28a607

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