This repository has been archived on 2025-05-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
fastly-py/fastly/scripts/purge_key.py

15 lines
290 B
Python

import sys, fastly
def purge_key():
if len(sys.argv) < 4:
print "not enough arguments!"
exit()
else:
auth_key = sys.argv[1]
svc_key = sys.argv[2]
purge_key = sys.argv[3]
api = fastly.API()
api.authenticate_by_key(auth_key)
api.purge_key(svc_key, purge_key)