Sample Nomad Event Stream Python Script?

Can anyone point me to a sample python script that they can share that subscribes to Nomad’s event stream? It doesn’t need to be pretty. We are considering using this approach for detecting when containers get added or deleted.

Python is definitely not one of my first languages, but this is a really quick thing that I whipped up. Seems to do the trick for me.

I have a gist here

Hopefully this will be useful for you.


Charlie Voiselle
Product Education Engineer, Nomad