Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/instacart/ahab

Docker event handling with Python
https://github.com/instacart/ahab

Last synced: 3 days ago
JSON representation

Docker event handling with Python

Awesome Lists containing this project

README

        

====
Ahab
====

.. image:: ahab.png

It's easy to install Ahab:

.. code:: bash

pip install ahab

To get detailed information about Docker events from the command line:

.. code:: bash

ahab --console debug

To use Ahab as library, you can pass functions to the ``Ahab()`` constructor:

.. code:: python

def f(event, data):
pass # Handle the Docker event (and extended info, as available)

ahab = Ahab(handlers=[f])
ahab.listen()

Or subclass ``Ahab``:

.. code:: python

class Queequeg(Ahab):
def handle(self, event, data):
pass # Your code here