Browse Source

Better way of storing passwords/keys

no_compress
Raphael Roberts 7 years ago
parent
commit
49f3e1f098
  1. 3
      .gitignore
  2. 4
      ctabus.py

3
.gitignore

@ -8,4 +8,5 @@ __pycache__
*_out.json
*.pdf
*.bat
stderr.log
stderr.log
sensitive.py

4
ctabus.py

@ -2,9 +2,7 @@ from urllib.parse import urlencode
from urllib.request import urlopen
import json
import os.path as osp
with open(osp.join(osp.dirname(__file__),'cta_api_key')) as file:
api = file.read()
from sensitive import api
def get_data(type,api_key = api,**args):
base_url = "http://www.ctabustracker.com/bustime/api/v2/{type}?{query}"
args['key'] = api_key

Loading…
Cancel
Save