[Stalled] Provide an Elsa class that can be used programmatically
Related: https://github.com/pyvec/elsa/issues/32
This is still very much work in progress, currently:
- There is a Elsa class people can use to do
freeze(),serve()anddeploy() -
cli(...)is now a shortcut toElsa(...).cli() - all integration tests pass without modification
However:
- a lot of stuff inside still prints and exists (notably deploy) - this is not acceptable with library API
I'd like an early feedback if possible.
Should the cli() thing be decoupled to not be part of the class?
I'm honestly not sure. I probably would have put it outside myself, but I don't think the current state of things is wrong.
OK, let me work on this as is, will try to fix all the printing and error reporting and change it so that only the actual CLI is talking. Will also try to add some unittests, since now we are defining an API.
Sounds good to me!
BTW I was thinking about this more and I think making cli() a separate function once again and just create an Elsa instance on each command will be more maintainable.