#!/usr/bin/env python
import argparse
import logging
import requests


logger = logging.getLogger(__name__)
ENDPOINTS = ('stops', 'stops_by_reason')


def main():
    logging.basicConfig(format='%(asctime)s %(levelname)-8s %(message)s',
                        level=logging.DEBUG)
    parser = argparse.ArgumentParser()
    parser.add_argument('uri', help='Agency REST URI')
    args = parser.parse_args()
    # get agencies
    r = requests.get(args.uri, auth=('admin', 'traff1cst0ps'), verify=False)
    agencies = r.json()
    for agency in agencies:
        logger.info(agency['name'])
        for endpoint in ENDPOINTS:
            uri = "{}/{}/{}/".format(args.uri.rstrip('/'), agency['id'],
                                    endpoint)
            requests.get(uri, auth=('admin', 'traff1cst0ps'), verify=False)


if __name__ == "__main__":
    main()

@@ -452,54 +452,8 @@
 .uri
-, auth=('admin', 'traff1cst0ps'), verify=False
 )%0A  
@@ -682,16 +682,17 @@
         
+ 
 endpoint
@@ -725,54 +725,8 @@
 (uri
-, auth=('admin', 'traff1cst0ps'), verify=False
 )%0A%0A%0A

remove http auth on cache script