This is an application template which uses Python, RabbitMq, pipenv and Docker.
RabbitMQ is the most widely deployed open source message broker.
RabbitMQ is lightweight and easy to deploy on premises and in the cloud. It supports multiple messaging protocols. RabbitMQ can be deployed in distributed and federated configurations to meet high-scale, high-availability requirements.
For more details check RabbitMQ Page.
Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. By doing so, thanks to the container, the developer can rest assured that the application will run on any other Linux machine regardless of any customized settings that machine might have that could differ from the machine used for writing and testing the code.
For more details check Docker Hub
Pipenv is a tool that aims to bring the best of all packaging worlds (bundler, composer, npm, cargo, yarn, etc.) to the Python world. Windows is a first-class citizen, in our world.
It automatically creates and manages a virtualenv for your projects, as well as adds/removes packages from your Pipfile as you install/uninstall packages. It also generates the ever-important Pipfile.lock, which is used to produce deterministic builds.
The problems that Pipenv seeks to solve are multi-faceted:
-
You no longer need to use
pip
andvirtualenv
separately. They work together. -
Managing a
requirements.txt
file can be problematic, so Pipenv uses the upcomingPipfile
andPipfile.lock
instead, which is superior for basic use cases. -
Hashes are used everywhere, always. Security. Automatically expose security vulnerabilities.
-
Give you insight into your dependency graph (e.g.
$ pipenv graph
). -
Streamline development workflow by loading
.env
files.
For more details check pipenv on GitHub
-
Python 3.9+
-
pipenv installed
-
Docker Engine 1.13.0+
-
Docker Compose installed
To create the virtual environment and install all libraries and packages open the terminal in the root folder of this project (same place where the pipfile
is) and type pipenv install
.
docker-compose up -d
This will download the RabbiMQ image from Docker Hub and start a container with the following ports mapped:
Host | Container | Description |
---|---|---|
5672 | 5672 | Queue port |
8080 | 15672 | Management port |