pyfcstm.entry.dispatch
Command-line interface entry point for the pyfcstm package.
This module defines the main Click command group used to expose the CLI for the project, including version reporting and help configuration. It builds user-facing metadata from the project configuration and provides a top-level command entry point.
The module contains the following main components:
pyfcstmcli()- Main Click command group for the CLI
Example:
>>> from pyfcstm.entry.dispatch import pyfcstmcli
>>> # Typically invoked via a Click entry point:
>>> # python -m pyfcstm --help
Note
The version display is implemented via a Click option callback, which prints version information and exits the process.
print_version
- pyfcstm.entry.dispatch.print_version(ctx: Context, param: Option, value: bool) None[source]
Print the version information for the CLI and exit.
This callback is invoked by Click when the
--versionflag is provided. It prints the project title, version, and author list (if available), then exits the Click context.- Parameters:
ctx (
click.core.Context) – Click context for the current command invocation.param (
click.core.Option) – Current Click option metadata.value (bool) – Boolean flag indicating whether the option was provided.
- Returns:
None.- Return type:
None
- Raises:
click.exceptions.Exit – Raised implicitly when
click.Context.exit()is invoked after printing version information.
Example:
>>> import click >>> from pyfcstm.entry.dispatch import print_version >>> ctx = click.Context(click.Command('demo')) >>> print_version(ctx, click.Option(['--version']), True)
pyfcstmcli
- pyfcstm.entry.dispatch.pyfcstmcli(*args: t.Any, **kwargs: t.Any) t.Any
Main Click command group for the
pyfcstmCLI.This command group provides a common entry point for subcommands and integrates global options such as
--versionand help flags.- Returns:
None.- Return type:
None
Example:
>>> # Typically invoked via a console entry point: >>> # $ pyfcstm --help