flowtool.main

The flowtool main command.

It is implemented as a click command group. The group members are all discovered via the setuptools entrypoints API, that baiscally allows us to define a named entrypoint in setup.py, that can point to an arbitrary object, which we can then later (when the package is installed) retrieve via it’s entrypoint name.

This is especially useful, since the entrypoints can also be assigend a group, and there is a function to get an iterator over all entrypoints of a group. The entrypoint group name for flowtool commands is flowtool_commands by convention, but adding more groups should be easy (as long as they don’t require a whole different handling).

The objects that the flowtool_commands entrypoints point to should be valid click commands that will be added to the main command group before it is executed. There is also a way to add options to the main group via the entrypoint group flowtool_option_extensions. This is currently more a proof of concept (demonstrated in flowtool-stages), and in there for completeness sake, so that the main command group can be configured thoroughly through entrypoints.

flowtool.main.flowtool_main_group(debug, **kwd)

flowtool - a pythonic screwdriver

This is the main command group of flowtool. It’s subcommands all come from compatible modules, that provide click commands via the setuptools entrypoints system.

flowtool.main.add_main_group_options(names=())[source]

Add options to the main command group from the entrypoint groups names.

flowtool.main.add_commands(names=())[source]

Add commands to the main command group from the entrypoint groups names.

flowtool.main.init_main_group()[source]

Main module execution flow.

Add options and commands to the main group, then start up the whole thing.