Giter Club home page Giter Club logo

desafio's Introduction

API Rest Python

This repo shows how to create a simple Python CRUD application using MySQL and Flask micro web framework. This application helps you to save deploy events in a MySQL database. Among the included features, you'll see how to:

  • POST a JSON with deploy event information;
  • List resources with GET metehod;
  • List a especific event passing the event ID in URI;
  • DELETE deploys events passing the event ID in URI;

Locally Requirements

  • Docker
  • python3
  • pip3
  • docker-compose
  • kubectl

Installation guide

Clone the repo
$ git clone 
$ cd Desafio
Run locally with docker

If you want to run this app locally using Docker, execute the command:

$ docker-compose up -d

After create the containers, acess http://localhost:5000/help to see how to use the API. In this case we are usin a MySQL server in docker container, if you want to user another MySQL database just change the env vars in docker-compose.yml file, pointing to your MySQL server, dont forget to use app.sql script to create the application database structure in your database.

Run in Kubernetes
$ kubectl create -f k8s-manifests/

After create the service, deployment and MySQL on K8S cluster, get the URL service acess http://urlservice:port/help to see how to use the API. In this case we are usin a MySQL server in Kubernetes cluster, if you want to user another MySQL database just change the env vars in k8s-manifests/app-deployment.yml pointing to your MySQL server, don't forget to use app.sql script to create the application database structure in your database.

desafio's People

Watchers

James Cloos 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.