Skip to content

Feature proposal: a honcho module API #208

@christophevg

Description

@christophevg

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:

from honcho.command import command_start, parser
def main():
  args = parser.parse_args(["start"])
  command_start(args)

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:

import honcho
def main():
  result = honcho.start()

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions