Skip to content

version_callback

faststream.cli.main.version_callback #

version_callback(version: bool) -> None

Callback function for displaying version information.

PARAMETER DESCRIPTION
version

If True, display version information

TYPE: bool

RETURNS DESCRIPTION
None

None

Note

The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)

Source code in faststream/cli/main.py
def version_callback(version: bool) -> None:
    """Callback function for displaying version information.

    Args:
        version: If True, display version information

    Returns:
        None
    !!! note

        The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
    """
    if version is True:
        import platform

        typer.echo(
            "Running FastStream %s with %s %s on %s"
            % (
                __version__,
                platform.python_implementation(),
                platform.python_version(),
                platform.system(),
            )
        )

        raise typer.Exit()

Last update: 2023-11-13