Coder Social home page Coder Social logo

misterxavier / python-flask-microservice Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ssola/python-flask-microservice

0.0 2.0 0.0 20 KB

Skeleton of a Microservice built with the Flask

License: Apache License 2.0

Dockerfile 2.95% Python 97.05%

python-flask-microservice's Introduction

python-flask-microservice

This is the code used in this series of articles:

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

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.

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.