This project was to build a flask microframework website within Google Cloud Platform while setting up continous delivery.
The project's intentions was to learn how to utilize GCP to automate as much of the provisioning as possible so that the code that you generate is able to be continously running.
Within this repo are two .yaml files; the first .yaml file runs install, lint and black on the main.py code to ensure that the pushed code is usable, and the second .yaml file deploys the app.
The main.py file itself demos a few features of flask, returning simple jsons and connecting to Google's NLP API to return analysis on Wikipedia entries.
The launched app can be found at here, and the flask's routes can be accessed by typing them into the URL.
This file contains all of the predetermined packages that the user has deemed essential for running this repository.
'Make' is an automation tool that is integrated into bash that allows one to execute bash commands. It is especially useful in establishing the "scaffold" of a new project.
To run any of the commands, one merely has to type make
into the terminal.
- The Makefile in this repository has the following commands:
- install - this reads the
requirements.txt
file and installs or upgrades all the packages declared by the user - pytest - identifies where python code has failed
- format - this implements autoformatting on all targeted python code
- lint - this tool rates the quality of the
main.py
file in this repository - credentials - this connects the not-uploaded creditial file to Google Language's API
- gcloud - configs the project to the current gcloud project
- install - this reads the
Additionally, there is a make all
command that runs make install
, make lint
, and make test
sequentially.
This file contains the flask app which has six routes, demonstrating different capabilities of flask. A route of interest is the wikipedia
route (demoed here for GameStop, which allows a user to input a company into the URL and output Google-Cloud-Language's, which gives an output json file for use in NLP analysis.
This .yml file automatically implements github's workflow action upon pushing code to github
This .yaml file automatically deploys the code to google cloud upon pushing the code to github