GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - andybor/python-flask-microservice: Skeleton of a Microservice built with the Flask

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

23 Commits
23 Commits

Folders and files

NameName
Last commit message
Last commit date
api
api
 
 
conf
conf
 
 
services
services
 
 
swagger
swagger
 
 
.env.template
.env.template
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
app.py
app.py
 
 
docker-compose.yml
docker-compose.yml
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

python-flask-microservice

This is the code used in this series of articles:

  • https://medium.com/p/building-microservices-with-python-part-i-5240a8dcc2fb
  • https://medium.com/@ssola/building-microservices-with-python-part-2-9f951199094a#.z48wq941g
  • https://medium.com/@ssola/building-microservices-with-python-part-3-a556a4c4bc00#.yn4p8rstp

This is a basic approach of building a Microservice on top of Flask, with some useful packages like:

  • Flask
  • Flask-Injector
  • Connexion

Requirements

We are going to build a microservice to index rooms information coming from another service (crawler). This service will be responsible for indexing the information into Elasticsearch.

The indexing will be a process of:

  • Validate and sanitize the data
  • Get some metadata from the room information like geolocalization
  • Upload the given images URL to Amazon S3
  • Send an event to RabbitMQ every time a new room has been indexed serializing the payload with Avro.

Endpoints:

Method URI Description Status
POST /room it will receive the room payload, and it will proceed to index it Development
PATCH /room/{id} this PATCH method will allow us to make changes on the indexed item Not started
DELETE /room/{id} this method will remove the room from the index Not started
GET /room/{id} this method will return the room data for a given room id Not started
GET /health-check This endpoint retuns the state of the service Not started

Running the environment

You need to have Docker installed in your machine, after that, just run this command docker-compose build && docker-compose up -d.

About

Skeleton of a Microservice built with the Flask

Resources

Readme
Apache-2.0 license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.