Browse Source

Better way of storing passwords/keys

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

1
.gitignore

@ -9,3 +9,4 @@ __pycache__
*.pdf
*.bat
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