An interactive back-end workshop created for SwampHacks 2019.

Google Slides Presentation: link


The purpose of this workshop is to help participants learn how to use Flask and Python in an interactive manner. Less slides, more code.

Since this is a back-end workshop, all front-end material (HTML, CSS) can be left untouched.


  1. Make sure you have a working Python environment with pip installed.
  2. Download and unzip flask-workshop.zip.
  3. cd into the flask-workshop directory containing hack-end.py.
  4. pip install flask and pip install pandas (in a virtualenv if you wish).
  5. Set appropriate environment variables (FLASK-APP=hack-end.py, FLASK_DEBUG=1)
  6. flask run (set the -p flag if the default port 5000 is already used).
  7. Take a look at the running app on localhost: in your browser. Make sure you see “Hello world!”.
  8. Download 0-start.py and copy/replace the contents into hack-end.py.
  9. Take a look at the running app again. You’ll see some broken links. Fix them.
  10. Download the next file once you’ve completed each segment. Have fun!


I was hoping to do this in the style of a CTF. Then I realized it would be very difficult to serve the answer tokens individually since the participants have full access to the back-end files. I ended up giving these links out iteratively to the entire group.

  1. 0-start.py
  2. 1-www.py
  3. 2-anaconda.py
  4. 3-matlab.py
  5. 4-python.py
  6. 5-hacked.py (all)