Skip to main content

A Boto3 like SDK for Akamai

Project description

pyakamai - The Akamai SDK for Python

Package Version Python Versions

pyakamai is the Akamai CDN Software Development Kit (SDK) for Python, which allows Python developers to write software that makes use of services like Akamai Delivery ,Security Configs and many more.

pyakamai (pronounced pie-akamai) is maintained and published by Achuthananda and a group of enthusiastic Akamai developers.

The advantage of pyakamai is application developers need not know about the underlying API calls and their usage. Application developers can just focus on getting their work done programmatically using the objects of pyakamai.

Getting Starterd

In order to use this configuration, you need to:

  • Set up your credential files as described in the doc.
  • When working through this process you need to give grants for the various APIs as needed. You can have any number of sections in your .edgerc file.

Install pip package available

$ pip install pyakamai

or install from source with:

$ git clone https://github.com/Achuthananda/pyakamai
$ cd pyakamai
$ python -m pip install -r requirements.txt
$ python -m pip install -e .

Using pyakamai

Using AkamaiProperty

Print Hostnames

>>> from pyakamai import pyakamai
>>> akamaiconfig = pyakamaiObj.client('property')
>>> akamaiconfig.config('test_bulkseach_update_1')
>>> hostnamesList = akamaiconfig.getHostNames(akamaiconfig.getProductionVersion())
>>> for hostname in hostnamesList:
>>>     print(hostname)

Print Basic Information

>>> akamaiconfig.printPropertyInfo()
Property Name: test_bulkseach_update_1
Contract Id: ctr_C-1IE2OHM
Group Id: grp_163363
Active Staging Version: 18
Active Production Version: 18

Create a new version

>>> akamaiconfig.createVersion(18)
'78'

Get rule Tree

>>>akamaiconfig.getRuleTree(18)
{'accountId': 'act_B-C-1IE2OH8', 'contractId': 'ctr_C-1IE2OHM', 'groupId': 'grp_163363', 'propertyId': 'prp_605086', 'propertyName': 'test_bulkseach_update_1', 'propertyVersion': 18, 'etag': 'd0d28a6b71e665144955f7f7e1ff214933d119d7', 'rules':.....}

Activate the config

>>>akamaiconfig.activateStaging(18,"testing activation",["apadmana@akamai.com"])
True

Using AkamaiEDNS

from pyakamai import pyakamai
pyakamaiObj = pyakamai('ACCOUN-SWITCH-KEY')

ednsClient = pyakamaiObj.client('edns')
for ednszone in ednsClient.listZones()['zones']:
    print(ednszone['zone'])

Project details


Release history Release notifications | RSS feed

This version

1.13

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyakamai-1.13-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file pyakamai-1.13-py3-none-any.whl.

File metadata

  • Download URL: pyakamai-1.13-py3-none-any.whl
  • Upload date:
  • Size: 26.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for pyakamai-1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 03cd66c78a0b63cc7589e79a60bf2ca00bea60ebc15f416afdc26abb5ea93ac7
MD5 62a7800578ec5aff153fa3e4d36fd430
BLAKE2b-256 2cf6ea7d59a1def891e2022978d6acdb7f6a81d0be238c40acdb91bfc69d7458

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