/python-kickoff

Turns your Python script or module into an application with decent CLI.

Primary LanguagePython

kickoff

PyPI - Version PyPI - License PyPI - Downloads

Turns your Python script or module into an application with decent user interface.

Let's have a look at demo.py:

"""Very simple application"""

def hello(*, name="World"):
    """Say hello"""

    print(f"Hello {name}!")

For software developers...

kickoff is inspired by utilities like invoke, fire, runfile. It has similar function with this difference that it looks at function signatures, therefore doesn't need from the developer to use decorators or any dedicated API. This way kickoff provides developers with following advantages:

  • Basic UI provided with zero overhead
  • Enhanced UI provided through annotations
  • Compatibility with environments where kickoff is not installed
  • Testability and reusability of top-level commands
  • Shebang support

For software users...

kickoff is built on top of stunning click module as well as third-party add-ons to provide the users with following features:

  • Hierarchical CLI interface
  • Correction suggestions for misspelled commands
  • REPL with command completion and access to underlying shell
  • GUI (experimental feature)

Resources

Development

Preparing environment:

./setup.sh
source venv/bin/activate

Updating dependencies:

vi requirements.in
vi setup.py
pip-compile
pip-sync

Releasing:

# update version:
vi docs/source/conf.py
vi setup.py
git commit -am "foobar"
git tag 1.2.3

# upload code
git push
git push --tags
python3 setup.py build sdist
twine upload dist/kickoff-1.2.3.tar.gz

# upload documentation
log into readthedocs.io and trigger a Build