Python Flask Bootstrap UI for Mars InSight Raw Images from NASA's API. Check out my demo here: https://nasa-insight-api.herokuapp.com/
The details below will get this project up and running on your local machine for development. See deployment for notes on how to deploy the project on Heroku.
Understanding how Flask is setup is important when getting started and requires a /templates
and /static
folder for your html
and css
respectively. Your html
will need to include specific Flask syntax in order for the python template engine called, jinja2
to render the page. Below is an example of the jinja2
syntax using a {{ url_for }}
to obtain your folders for stylesheets.
Starting with app.py
you'll see all imports and libraries used to get started. I created a class for user notifications which included validation with WTForms
. Each route is to display /images
, confirm /sms
, and /email
. The most important route for /images
is a request to the InSightAPI
for all images. Next feature will include a search option to search by date. The model.py
was for my SQLite3
database setup however, I will be moving to Postgres as Heroku doesn't fully support SQLite3.
This application is deployed on Heroku which required a Procfile and runtime.txt file. I used a .env
file for my Twilio API keys and utilized os.environ.get
in my code for retrieval.
- InsightAPI - Python library
- Flask - Microframework
- Bootstrap - Styling
- WTForms - Forms
- Twilio - SMS messages to user
- Sqlite3 - DB to store user's phone and email (moving to Postgres)
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
I plan on implementing versioning when I deploy next features after DB is setup.
- Mariam Joan - Initial setup - MJOAN
This project is licensed under the MIT License - see the LICENSE.md file for details