Skip to main content

A package for easily creating CLIs.

Project description

Note: this package is under heavy development and breaking changes are to be expected.

Welcome to Thermite, a CLI generator

What are the main things that this package provides.

  • run any python function or class that has type annotations
  • Use docstrings as the source of help
  • not require changing the signature of existing functions to customize
  • allow for classes as parameter annotations in functions that will be translated into grouped options
  • Allow for custom classes to be used as type annotations.
  • provides the possibility to change the defaults in the CLI by using YAML or JSON definitions (an easy way to use configuration files with CLIs)
  • provides a plugin-interface to extend functionality (e.g. the help itself is just a plugin)

Installation

The package is available on pip, so can be installed with

pip install thermite

Getting started

For any function, class or instance, just use

from thermite import run

if __name__ == "__main__":
    run(obj)

and the package does the rest.

Customization, other examples and docs

For more documentation on how to customize the CLI, other options and examples visit the documentation.

Other CLI generators

There are already lots of CLI generators for python, many with lots of usage and great functionality that have inspired this package. Check them out.

  • argparse
  • click
  • typer
  • fire
  • docopt

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

thermite-0.1.1.tar.gz (39.4 kB view hashes)

Uploaded Source

Built Distribution

thermite-0.1.1-py3-none-any.whl (30.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page