AKAMAI快速清除API的客户
fastpurge的Python项目详细描述
用于Akamai Fast Purge API的python客户端。
这个库为快速清除提供了一个简单的异步python包装器 应用程序编程接口。功能包括:
- 方便地处理身份验证
- 从错误中恢复
- 将大请求拆分成较小的部分
安装
从pypi安装fastpurge
包。
pip install fastpurge
用法示例
假设一个有效的~/.edgerc
文件根据
Akamai的文档:
fromfastpurgeimportFastPurgeClient# Omit credentials to read from ~/.edgercclient=FastPurgeClient()# Start purge of some URLspurged=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)
许可证
此程序是免费软件:您可以重新分发和/或修改 根据由 自由软件基金会,或者许可证的第3版,或者 (由您选择)任何更高版本。