Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

akamai-papi

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

akamai-papi

SDK for Akamai Property Manager API (PAPI)

pipPyPI
Version
0.1.2
Maintainers
1

akamai_papi

A Lightweight Python SDK for interacting with Akamai's Property Manager API (PAPI).

Features

  • Load credentials from ~/.edgerc
  • List groups and contracts
  • Enumerate properties within groups
  • Retrieve property rules for specific versions
  • Pythonic interface to Akamai PAPI endpoints

Installation

pip install akamai_papi

Setup

Ensure your ~/.edgerc file is correctly configured. Example:

[default]
client_token = your-client-token
client_secret = your-client-secret
access_token = your-access-token
host = your-host.luna.akamaiapis.net

Usage

from akamai_papi import PapiClient
client = PapiClient()

List Groups

groups = client.list_groups()
for group in groups:
    print(group['groupName'], group['groupId'])

List Contracts

contracts = client.list_contracts()
for contract in contracts:
    print(contract['contractId'], contract['contractType'])

List Properties in a Group

properties = client.list_properties(group_id=group['groupId'])
for prop in properties:
    print(prop['propertyName'], prop['propertyId'])

Get Rules for a Property Version

rules = client.get_property_rules(
    property_id=prop['propertyId'],
    version=prop['latestVersion'],
    group_id=group['groupId']
)
print(rules)

Get All Versions of a Property

versions = client.get_property_versions(prop['propertyId'], group['groupId'])
for version in versions:
    print(version['propertyVersion'], version['updatedDate'])

Development

Clone the repo and install it in editable mode:

git clone https://github.com/yourusername/akamai_papi
cd akamai_papi
pip install -e .

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts