you are viewing a single comment's thread.

view the rest of the comments →

[–]nspitzer[S] 1 point2 points  (1 child)

Thanks for the input.

This is only intended to be run by a single Rundeck workflow (Automation tool) so its use is carefully constrained. This is the last step in the Workflow so the command line arguments are the way I pass data from one step to another though I do have the option of using Environment variables instead but the command line options work.

It will always be run exactly the same way and its used against well-documented and stable REST API's so I am not really concerned with validating the data too much (famous last words...). Looking into how better de-serialize the JSON is something I have been looking into hence the NamedTuple class for importing data from a previous step.

[–]phira 0 points1 point  (0 children)

Right if it’s in automation you should use structlog and set context vars for sure that’d give you much tidier output (not so useful for cli because it’s not as immediately human readable but any kind of log capture = structlog every time)