Coder Social home page Coder Social logo

cloud-proj01-contdeliveryflask-gcp's Introduction

cloud-proj01-contDeliveryFlask-GCP

Introduction

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.

Repository Contents and File Descriptions:

1. requirements.txt

This file contains all of the predetermined packages that the user has deemed essential for running this repository.

2. Makefile

'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:
    1. install - this reads the requirements.txt file and installs or upgrades all the packages declared by the user
    2. pytest - identifies where python code has failed
    3. format - this implements autoformatting on all targeted python code
    4. lint - this tool rates the quality of the main.py file in this repository
    5. credentials - this connects the not-uploaded creditial file to Google Language's API
    6. gcloud - configs the project to the current gcloud project

Additionally, there is a make all command that runs make install, make lint, and make test sequentially.

3. main.py

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.

4. workflows/main.yml

This .yml file automatically implements github's workflow action upon pushing code to github

5. cloudbuild.yaml

This .yaml file automatically deploys the code to google cloud upon pushing the code to github

cloud-proj01-contdeliveryflask-gcp's People

Contributors

joehs16 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.