A Python Class for Akamai Property
An Object oriented implementation of Akamai Property. The advantage of Akamai Property class is application developers need not know about the PAPI calls and their usage. Application developers can just focus on getting their work done on Property Manager configs programmatically using the objects of AkamaiProperty.
Credentials
In order to use this configuration, you need to:
- Set up your credential files as described in the authorization and credentials sections of the getting started guide on developer.akamai.com.
- When working through this process you need to give grants for the property manager API and the User Admin API (if you will want to move properties). The section in your configuration file should be called 'papi'.
Overview
The advantage of Akamai Property class is application developers need not know about the PAPI calls and their usage. Application developers can just focus on getting their work done on Property Manager configs programmatically using the objects of AkamaiProperty.
Install Dependencies If you are using source code.
$ pip install -r requirements.txt
Install pip package available
$ pip install akamaiproperty
Instantiate the object.
>>> from akamaiproperty import AkamaiProperty
>>> myProperty = AkamaiProperty("/Users/apadmana/.edgerc","test_bulkseach_update_1","<accountSwitchKey>")
>>> myProperty = AkamaiProperty("/Users/apadmana/.edgerc","test_bulkseach_update_1")
Print Basic Information
>>> myProperty.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
>>> myProperty.createVersion(18)
'78'
Get rule Tree
>>>myProperty.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
>>>myProperty.activateStaging(18,"testing activation",["apadmana@akamai.com"])
True
Class Definition
class AkamaiProperty():
def __init__(self,edgercLocation, name, accountSwitchKey=None):
self.name = name
self.contractId = ''
self.groupId = ''
self.propertyId = ''
self.stagingVersion = 0
self.productionVersion = 0
self.accountSwitchKey = ''
def printPropertyInfo(self)
def getStagingVersion(self)
def getProductionVersion(self)
def getRuleTree(self,version)
def updateRuleTree(self,version,jsondata)
def createVersion(self,baseVersion)
def activateStaging(self,version,notes,email_list)
def activateProduction(self,version,notes,email_list,peer_review_email,customer_email)
Metadata
Release files for akamaihttp 1.6.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| akamaihttp-1.6.4-py3-none-any.whl | Python 3 | none | any | Details |
Release files / akamaihttp-1.6.4-py3-none-any.whl
| Download URL | akamaihttp-1.6.4-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18d29dd22f03dc4c5ad28da82cf476f57d4f232d2b32ab6a2049140ddf4e322c
|
|
BLAKE2b-256 checksum How to use checksums |
006ce9dc24738d6fd434de7136b07f9716646a469cf4294f481b92db2bbcefda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.8.2
|
Security for akamaihttp 1.6.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.