config_example.py and config.py

You will notice config.py does not exist in the repository. The instructions below explain how to create it.

Copy the code/text in config_example.py and create a file named config.py, an important file that keeps a key and the base URL for the Bing Maps API.

Variables:

  • API_KEY: a unique string that verifies Strategy’s access to Bing Maps. Not filled out in the example. See below.

  • BASE_URL: the URL string that is built off for all calls to the API. Queries are added to this string and requested for from the API, responses are returned (hopefully with data).

The API key that Strategy has created currently has an Education license that was requested from Bing Maps in late 2020 (a vintage year), if the key is made public it may cause a bit of trouble getting the license again.

As of now (Feb 2021), git will automatically ignore config.py files in all directories so that credentials are kept safe due to the .gitignore file. However, please be careful when committing, and make sure commits do not capture the key.

The API key for Bing Maps is available here. Ask the leads for access if you don’t have it!