def hash_t(input_hashtag): """ When ready to go live, uncomment this section and remove GET from the methods if request.form['api_key'] == TEST_POST_PASS: c = Cache(input_hashtag) cc = c.buildIt() cr = c.readIt() return cr else: return 403 ... and delete this stuff below """ c = Cache(input_hashtag) cc = c.buildIt() cr = c.readIt() return cr
#!/usr/bin/python3 import os from pprint import pprint from cache import Cache abpath = os.path.dirname(os.path.abspath(__file__)) hashtags = os.listdir(abpath + '/hashtags') for h in hashtags: if h.startswith("."): continue pprint(h) c = Cache(h) c.buildIt()