Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 1.42 KB

README.md

File metadata and controls

31 lines (25 loc) · 1.42 KB

nomad-diff

CircleCI PyPI Version Supported Python Versions Requirements Status Code Coverage Is Wheel

A one to one Python re-write of the Job diff formatter from Nomad's source. Use this if you communicate with Nomad over HTTP API and want to output the diff in the same format like the Nomad CLI & UI does.

Installation

$ pip install nomad-diff

Usage

>>> import nomad_diff
>>>
>>> data = .. # Nomad's job diff
>>>
>>> print(nomad_diff.format(data, colors=True, verbose=False))
+/- Job: "example"
+/- Task Group: "cache" (2 destroy, 1 in-place update)
  +/- Count: "3" => "1" (forces destroy)
      Task: "redis"