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

15 lines
289 B
Python

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