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_service.py

14 lines
259 B
Python

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