Skip to content

A simple microservice project using Python, RabbitMQ, Nameko and Flask

License

Notifications You must be signed in to change notification settings

RobertoDebarba/microservices-python-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Microservice example project using Python, RabbitMQ, Nameko and Flask

This a simple microservice sale and stock management system using Python, RabbitMQ, Nameko and Flask.
It's just an example, where I demonstrate the use of these technologies.

Based in Bruno Rocha tutorial.

Build and Run

Requirements

  • Python 3.5.1
  • Docker

Run

  • Download RabbitMQ Docker image:
docker run -d --hostname my-rabbit --name some-rabbit -p 15672:15672 -p 5672:5672 rabbitmq:3-management

You can see RabbitMQ dashboard in http://192.168.99.100:15672

  • Install Nameko and Flask
pip install nameko
pip install flask
  • Run service
nameko run service --broker amqp://guest:guest@192.168.99.100

You can test the service by nameko shell:

nameko shell --broker amqp://guest:guest@192.168.99.100
n.rpc.sale.sell(1)
  • Run api
python api.py

The api is avaible in http://localhost:5000/

License

The codebase is licensed under GPL v3.0.

About

A simple microservice project using Python, RabbitMQ, Nameko and Flask

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages