Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/release-engineering/python-fastpurge
Python client for Akamai Fast Purge API
https://github.com/release-engineering/python-fastpurge
akamai akamai-api akamai-open python python2 python3
Last synced: 19 days ago
JSON representation
Python client for Akamai Fast Purge API
- Host: GitHub
- URL: https://github.com/release-engineering/python-fastpurge
- Owner: release-engineering
- License: gpl-3.0
- Created: 2019-02-07T03:07:20.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-22T09:54:05.000Z (9 months ago)
- Last Synced: 2024-04-24T13:22:11.107Z (8 months ago)
- Topics: akamai, akamai-api, akamai-open, python, python2, python3
- Language: Python
- Size: 416 KB
- Stars: 6
- Watchers: 11
- Forks: 11
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
python-fastpurge
================A Python client for the [Akamai Fast Purge API](https://developer.akamai.com/api/core_features/fast_purge/v3.html).
[![Build Status](https://github.com/release-engineering/python-fastpurge/actions/workflows/tox-test.yml/badge.svg)](https://github.com/release-engineering/python-fastpurge/actions/workflows/tox-test.yml)
[![codecov](https://codecov.io/gh/release-engineering/python-fastpurge/branch/master/graph/badge.svg?token=cRnzaGyvkk)](https://codecov.io/gh/release-engineering/python-fastpurge)
[![Maintainability](https://api.codeclimate.com/v1/badges/2a5d60f6ddb557d88055/maintainability)](https://codeclimate.com/github/release-engineering/python-fastpurge/maintainability)- [Source](https://github.com/release-engineering/python-fastpurge)
- [Documentation](https://release-engineering.github.io/python-fastpurge/)
- [PyPI](https://pypi.org/project/fastpurge)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 piecesInstallation
------------Install the `fastpurge` package from PyPI.
```
pip install fastpurge
```Usage Example
-------------Assuming a valid `~/.edgerc` file prepared with credentials according to
Akamai's documentation:```python
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.