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

akamaisdk

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

akamaisdk

Lightweight Python SDK for interacting with Akamai APIs using EdgeGrid authentication.

pipPyPI
Version
0.1.0
Maintainers
1

akamaisdk

akamaisdk is a lightweight Python SDK for interacting with Akamai APIs using EdgeGrid authentication.

✨ Features

  • ✅ HMAC-signed Akamai EdgeGrid authentication via EdgeAuth
  • ✅ Simple wrapper for Akamai App & API Protector endpoints
  • ✅ Modular, easy to extend

📦 Installation

pip install akamaisdk

🔧 Setup

from akamaisdk import EdgeAuth, get_policies

auth = EdgeAuth(
    client_token="YOUR_CLIENT_TOKEN",
    client_secret="YOUR_CLIENT_SECRET",
    access_token="YOUR_ACCESS_TOKEN",
    base_url="https://akab-xxxx.luna.akamaisdks.net"
)

🚀 Examples

List App & API Protector Policies

policies = get_policies(auth)
for policy in policies.get("policies", []):
    print(policy["policyId"], policy["policyName"])

Get a Specific Policy

policy_id = "12345"
policy = get_policy_details(auth, policy_id)
print(policy)

🧱 SDK Architecture

akamaisdk/
├── __init__.py         # Exports core classes/functions
├── edgeauth.py         # EdgeGrid authentication logic
├── appsec.py           # App & API Protector endpoints

🛡️ Authentication Internals

Akamai requires signed requests using the EG1-HMAC-SHA256 scheme. EdgeAuth handles:

  • Timestamp and nonce generation
  • Canonical request hashing
  • Signature generation using HMAC-SHA256

📤 Contributing

  • Fork this repo
  • Create a new branch
  • Submit a pull request

📜 License

MIT

🧩 Roadmap

  • Add support for other Akamai APIs (e.g. GTM, PAPI, Reporting)
  • Async support with httpx
  • CLI interface for fast testing

Made with ☕, 💻 and pure edgegrid rage.

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