Open Fizzadar opened 3 years ago
Currently output is written (correctly) to stderr
I'm using subprocess
to run pyinfra from my script and also noted that. May I ask why this is correct? Seems counterintuitive.
Any kind of ETA for this particular --json
implementation?
Is your feature request related to a problem? Please describe. As it stands
pyinfra
is very much a CLI tool executed by users. There's the programmatic API as well for Python folk but there's also no reason the CLI can't be used within scripts and so on. Currently output is written (correctly) tostderr
but no machine readable output is emitted tostdout
- this flag would push out JSON during execution, such that the whole output would be a valid JSON object.This would make it possible to integrate
pyinfra
into any number of systems without writing any Python code.Describe the solution you'd like Add
--json
CLI flag that makespyinfra
emit machine readable JSON output tostdout
during execution. Possibly in tandem with a flag to hide most/allstderr
user output.