Python hermes-py Documentation — hermes 0.1 documentation

# Python hermes-py Documentation

Hermes is a Postgres-talking, event-driven, failure-handling Python library. Its main purpose is to enable the easy implementation of resilient Python processes which require communication with Postgres. It defines a base-layer which you can build as little or as much as you like on top of.

It’s been used at Transifex to fulfil a number of roles, one of them including a Postgres -> Elasticsearch river.

## Compatibility

*nix operating system which supports the select function.

Postgresql 9.0+ is required to support LISTEN/NOTIFY commands.

## Installation

    pip install hermes-pg

## Usage

Most users will just need to define some form of process to run when an event is emitted. This can be achieved by defining a processor object and supplying that to the Client object like so:

    from hermes.components import Component

    class Processor(Component):
        def __init__(self,)
            super(Processor, self).__init__()

        def execute(self):
            # Do some amazing event-driven stuff
            ...

## Contents

- Client
- Components
- Connectors
- Listeners
- Strategies
- Exceptions
- Changelog
  - 0.3.1 (2015-03-24)
  - 0.3 (2015-03-18)
  - 0.2 (2015-03-11)
  - 0.1 (2014-10-11)

## Indices and tables

- Index
- Module Index
- Search Page