W 2022-11-23 08:00 EST
Estimated time required: <=30min/evening+classtime
hopefully you WILL go to space today
Your Duo Mission:
Step 0: Come together. “Form like Voltron.”
- Procure an API key from NASA Open APIs.
- Verify that your key works by making a simple HTTP request using your new key.
- Have dev console open while you do this…
- Note anything notable.
- Use QAF liberally.
- Write a Flask app…
- whose sole route
- renders a template, which
- displays image(s) procured via API call,
- along with a bit of explanation of the image content. (You need only 2 files to accomplish this.)
Specifications/Guidelines:
- Note anything notable in readme. (Include DISCO and QCC sections.)
- Display team name and roster on rendered page.
- Store your API key in a plaintext file as indicated, but do not have git track it. (Your key should be the sole content of the file.)
- Reminder: include heading as comment in your html and python files.
PROTIPS:
- Simplicity is divine.
- Diagnostic print statements are your friend.
- Use them liberally.
- When not in use, comment out rather than delete.
- Pay close attention to Flask console during development.
- Use your browser’s developer console…
- Comment liberally in-line. Speak to your future self and/or future teammates.
DELIVERABLES:
- In your heading, replace your name with your TNPG and roster.
- Save to workshop as indicated.
path/to/myworkshop/20_restapi$ tree
.
├── app.py
├── key_nasa.txt
├── readme
└── templates
└── main.html