Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Python wrapper around Akamai ccuapi
branch: master

This branch is 44 commits behind dpetzel:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ccuapi
.akamai.sample
.gitignore
LICENSE
MANIFEST.in
README
README.md
development.md
requirements.txt
requirements_dev.txt
setup.py

README.md

python-ccuapi

Python wrapper around Akamai ccuapi

Hat tip to https://github.com/beathan/django-akamai for inspiring the original code.

Credentials

Credentials can be provided in 1 of 3 ways:

  1. AKAMAI_USERNAME and AKAMAI_PASSWORD environment variables.
  2. A .akamai config file in the user's home directory. (Sample config included as .akamai.sample)
  3. Passing username and password kwargs to ccuapi.purge.PurgeRequest on initialization.

Email Notifications

One or more comma-separated email addresses may be set to receive notifications when a content purge is complete. These are provided in 1 of 3 ways:

  1. AKAMAI_NOTIFY_EMAIL environment variable.
  2. In the .akamai config file.
  3. Passing email kwarg to ccuapi.purge.PurgeRequest on initialization.

Usage

from ccuapi.purge import PurgeRequest
purger  =   PurgeRequest()
purger.add('http://domain.com') # this can be a string, or list of strings
results =   purger.purge() # returns the status of the request

Command Line Usage

ccu_purge http://domain.com

Run ccu_purge -h for additional options.

Using a proxy server?

ccuapi_purge will honor the standard proxy environment variables so if you are running behind a proxy export the proper environment variables:

$ export HTTP_PROXY="http://10.10.1.10:8080"
$ export HTTPS_PROXY="http://10.10.1.10:8080"
Something went wrong with that request. Please try again.