Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install ccuapi

How to install ccuapi

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install ccuapi
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
0.3.1 Available View build log
0.1.0 Available View build log
Linux (32-bit)
0.3.1 Available View build log
0.3.0 Available View build log
0.1.0 Available View build log
Linux (64-bit)
0.3.1 Available View build log
0.3.0 Available View build log
0.1.0 Available View build log
 
Author
License
BSD 3 Clause License
Dependencies
Imports
Lastest release
version 0.3.1 on May 6th, 2013

Python wrapper around Akamai ccuapi

Hat tip to https://github.com/beathan/django-akamai for inspiring the 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)](https://github.com/dryan/python-ccuapi/blob/master/.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, list of strings, Django QuerySet or Django object with the get_absolute_url method defined results = purger.purge() # returns a list of responses from Akamai, 1 per 100 URLs sent

## Command Line Usage

ccu_purge http://domain.com

Run ccu_purge -h for additional options.

## Using a proxy server?

If you're using this library on a server that uses an http/https proxy, you'll likely hit Connection Timeout issues because suds ignores the environment proxy variables, as [described here](http://stackoverflow.com/questions/12414600/suds-ignoring-proxy-setting).

One simple solution:

#Hat tip: http://stackoverflow.com/questions/12414600/suds-ignoring-proxy-setting from suds.transport.http import HttpTransport as SudsHttpTransport class EnvProxyHonoringTransport(SudsHttpTransport):

System Message: ERROR/3 (<string>, line 47)

Unexpected indentation.
def u2handlers(self):
return []

purger = PurgeRequest(...) purger.client.set_options(transport = EnvProxyHonoringTransport())

Subscribe to package updates

Last updated May 6th, 2013

Download Stats

Last month:2

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.