- how to deliver the same features in both api endpoints and static html forms in one Flask project
- how Flask can be used with the MVC design pattern with the controller imported as Flask blueprints
- how Flask can deal with Github integration using the Github API v3 (used as the model "persistence" layer in the MVC design pattern)
- api endpoint pytest testing using the requests library
- ability of such a web application to gracefully fail on Github integration exceptions
- git clone this repo
- setup a virtual environment for this project
- create a Github personal access token: login to Github and go to settings - developer settings - Personal access tokens - Generate a new token
- generate a random flask secret app key
- setup your environment variables like:
github_token = <your github token value>
flask_secret_key = <your generated flask secret key>
- setup your github repository name, the "files playground" folder and other settings in flaskr/project_variables/settings.py
- your startup configuration should look like this:
*disclaimer: this example project codebase comes as is, in a production ready application, besides other things, you should use the OAuth protocol for the Github login, this library can get you started: https://github-flask.readthedocs.io/en/latest/