Hi,

I thought of separating the Python CLI into 3 main parts, those are,

1. Main.py - that contains the entry point, it does the initializing parts,
creates a CLI instance and runs the loop,
2. CLI.py - this is the actual CLI that extends Cmd2. This contains the
command to def mappings, argument and flag handling, printing outputs, etc.
3. Stratos.py - this contains the actual business logic, that is, which
REST end point to call, and do what with the response, what to show, what
not, etc. At the end, this would be like a Python API for Stratos.

This way, in the future, we can even replace Cmd2 CLI framework without any
issue, if we have to.

Your ideas? :)

Reply via email to