Skip to content

release-engineering/python-fastpurge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d5827bf · Mar 22, 2024

History

77 Commits
May 23, 2023
Mar 15, 2019
Feb 28, 2024
Feb 18, 2019
Feb 2, 2024
Feb 18, 2019
Feb 7, 2019
Mar 22, 2024
Feb 7, 2019
Feb 19, 2019
Dec 8, 2022
Dec 2, 2022
Mar 22, 2024
Feb 2, 2024
May 23, 2023

Repository files navigation

python-fastpurge

A Python client for the Akamai Fast Purge API.

Build Status codecov Maintainability

This library provides a simple asynchronous Python wrapper for the Fast Purge API. Features include:

  • convenient handling of authentication
  • recovery from errors
  • splitting large requests into smaller pieces

Installation

Install the fastpurge package from PyPI.

pip install fastpurge

Usage Example

Assuming a valid ~/.edgerc file prepared with credentials according to Akamai's documentation:

from fastpurge import FastPurgeClient

# Omit credentials to read from ~/.edgerc
client = FastPurgeClient()

# Start purge of some URLs
purged = client.purge_by_url(['https://example.com/resource1', 'https://example.com/resource2'])

# purged is a Future, if we want to ensure purge completed
# we can block on the result:
result = purged.result()
print("Purge completed:", result)

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Packages

No packages published

Contributors 11