No description
Find a file
2025-12-02 08:14:56 +07:00
.gitignore Initial commit 2025-11-08 09:20:35 +07:00
.python-version Initial commit 2025-11-08 09:20:35 +07:00
edgegrid_auth.py Initial commit 2025-11-08 09:20:35 +07:00
main.py Initial commit 2025-11-08 09:20:35 +07:00
pyproject.toml Initial commit 2025-11-08 09:20:35 +07:00
README.md Add README.md 2025-12-02 08:14:56 +07:00
uv.lock Initial commit 2025-11-08 09:20:35 +07:00

AKNetworkList

This file provides usage to Akamai Network List API.

Project Overview

Python-based Akamai API integration tool for managing Client Lists using EdgeGrid authentication.

Environment Setup

This project uses uv for Python package management with Python 3.13+.

Required Environment Variables (stored in .env):

  • HOST: Akamai API hostname
  • CLIENT_TOKEN: EdgeGrid client token
  • CLIENT_SECRET: EdgeGrid client secret
  • ACCESS_TOKEN: EdgeGrid access token

Running the Application

uv run main.py

Architecture

Single-file application (main.py) that provides wrapper functions for Akamai API endpoints:

  • Authentication: Uses EdgeGrid authentication via akamai.edgegrid with credentials from environment variables
  • Session Management: Single requests.Session instance with EdgeGrid auth handler
  • API Functions:
    • list_api_certificates(): Lists active CPS certificates for a contract
    • get_client_lists(): Retrieves Client List configurations
    • update_client_lists(): Appends IP addresses to a specific Client List (hardcoded: 238903_TESTRAMA)
    • activate(): Activates Client List changes to STAGING or PRODUCTION network
    • get_activation_status(): Checks activation status for a network environment

Current Behavior: The main() function has commented-out API calls and currently only executes get_activation_status() for STAGING.

Dependencies

  • edgegrid-python: Akamai EdgeGrid authentication
  • python-dotenv: Environment variable management