Skip to content

paulgoetze/flask-gcs-upload-example-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

"Uploading files to Google Cloud Storage using a Flask API" – Example App

This is the example app for our 3-part post series on Medium:

  • Part 1: basic app setup, configuring testing & production filedepots (see part-1 branch)
  • Part 2: testing and implementing the User model & file upload endpoint (see part-2 branch)
  • Part 3: customising the upload & allowing multiple depots (see part-3 branch)

Running the App

In order to run the Flask app:

  • make sure you have Python v3.10+ and pipenv installed
  • run pipenv install to install the dependencies
  • run pipenv shell to activate the projects virtualenv
  • copy my_app/config/app_config.py.sample to my_app/config/app_config.py and adjust the config variables to your needs
  • run FLASK_APP=my_app flask db upgrade to init the configured database
  • run FLASK_APP=my_app flask run to start the local server
  • run pytest to run the test suite