Pigeon is a combination of a STOMP client, and a message definition system using Pydantic models.
Messages are defined by writing a Pydantic model for each topic. These messages can be registered at runtime, or placed in a Python package and automatically loaded when Pigeon is imported using an entrypoint.
When a Pigeon client is instantiated, a logger is created. If desired, logs can also be sent to Grafana Loki by setting environment variables.
Variable | Documentation |
---|---|
LOKI_URL | The URL of the location of the Loki Server |
LOKI_TAGS | A mapping using colons to split tags and values, and commas to separate pairs |
LOKI_USERNAME | The username to use when connecting to the server |
LOKI_PASSWORD | The password to use when connecting to the server |
LOKI_VERSION | The version of the Loki Emitter to use |
To ease the creation of services using Pigeon, a Cookiecutter template is available. Similarly, a template for a message definition package is available.