Ahab

ahab.png

It's easy to install Ahab:

pip install ahab

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

ahab --console debug

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

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


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

Or subclass Ahab:

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


Ahab

ahab.pngsrc

安装Ahab很容易:

pip install ahab

要从命令行获取有关Docker事件的详细信息:

ahab –console debug

要使用Ahab作为库,可以将函数传递给 Ahab()构造函数:

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

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

或子类<代码> Ahab :

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




相关问题推荐