Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

The Python interface to the Hermes message broker.

Project Description

## pyhermes

[![Version Badge](](
[![Build Status](](

The Python interface to the [Hermes]( message broker.

## Documentation

The full documentation is at

## Installation

To install pyhermes, simply:

pip install pyhermes

Then use it in a project:

import pyhermes

## Features


## Quickstart

### Subscriber

To create handler for particular subscription topic decorate your function using `subscribe` decorator:

import pyhermes

def handler(data):
# process data

This function will be called every time there is new message published to the selected topic.

### Publisher
Use `publish` function to publish data to some topic in hermes:

import pyhermes

def my_complex_function(a, b, c):
result = a + b + c
publish(my_complex_function._topic, {'complex_result': result})

You could publish directly result of the function as well:

import pyhermes

@pyhermes.publisher(topic='pl.allegro.pyhermes.sample-topic', auto_publish_result=True)
def my_complex_function(a, b, c):
return {'complex_result': a + b + c}

Result of decorated function is automatically published to selected topic in hermes.

## Running Tests

Does the code actually work?

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install -r requirements-test.txt
(myenv) $ python

## Credits

Tools used in rendering this package:

* [Cookiecutter](
* [cookiecutter-djangopackage](

# History

## 0.3.0 (2016-12-29)

* Retry publishing to hermes in case of failure (default: 3x)
* Support for Python3.6, Django 1.10 and Django development version in tests

## 0.2.1 (2016-12-12)

* Configure custom label for django app #11

## 0.2.0 (2016-11-03)

* Fix ambiguity with pyhermes.decorators.subscriber (rename subscriber module to subscription)

## 0.1.3 (2016-06-21)

* Allow for custom wrapper around subcriber function
* Additional logging for event id and retry count
* Added support for Django <= 1.7
* Raw data is dumped only to debug logs.

## 0.1.2 (2016-04-20)

* New management command for testing Hermes connection

## 0.1.0 (2016-04-13)

* First release on PyPI.

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(13.4 kB) Copy SHA256 Hash SHA256
3.5 Wheel Jan 27, 2017
(11.1 kB) Copy SHA256 Hash SHA256
Source Jan 27, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting