-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature proposal: a honcho module API #208
Comments
As I ran into more issues than first expected, simply creating a wrapper in my project didn't cut it anymore ;-) To be able to continue, I forked Honcho to my own space and started working on separating the command-line interface from the actual Honcho Python code, to see where I could go with this. A very rough cut currently does the trick (and even passes the tests ;-)), but will need some more love. So far it looks like this: The command-line related stuff still resides in: But the Honcho class (aka API) now lives in: And this basically allows one to write: from honcho import Honcho
honcho = Honcho()
honcho.start() Still, although most of the code now already has been written, it is still more of an open invitation to discuss this, and if it seems a valid feature, I'm more than willing to go through the code in detail to bring everything up to par of the rest of the codebase and in line with the projects preferred style, etc. regards, |
Whoops, wrong button :-( |
It seems to me that the proposal here is actually to introduce a higher-level API to Honcho that mostly emulates the CLI, as you can already use |
Hi,
I'm currently working on a small wrapper project around honcho. I want to add some application control (e.g. scheduling, respawning,...) around the honcho Procfile starting capability. To do so I want to use honcho from some other Python script.
At this point, honcho is primarily focussed on being run as a command line utility and not so much on being called from other Python code. For example, if I want to start an application with a Procfile, I have to mimic the CLI approach like this:
Doable, but a main drawback is that I have little control with respect to the outcome. I think a honcho module API would be a nice addition to the project. With such an API, the code above could look something like:
Since I'm about to write such a layer in my project, duplicating a lot of code from inside the honcho module, I could also apply this directly to the honcho module and submit it as a PR. But since this is of course a "larger" PR, possibly with more consequences, I prefer to first propose it and discuss any feelings about it.
regards,
Christophe
The text was updated successfully, but these errors were encountered: