fleche.__main__

python -m fleche <command> ... dispatcher.

Currently the only subcommand is remote, which runs the cache RPC server fleche.remote.SshCache connects to. Register additional subcommands by adding a parser in _build_parser() and a branch in _main().

The CLI deliberately lives here rather than inside fleche.remote: the package’s __init__ transitively imports fleche.remote (e.g. through fleche.config), so invoking the server as python -m fleche.remote would load remote.py twice — once as the submodule and once as __main__ — and emit the runpy “found in sys.modules … prior to execution” warning, with two separate copies of every class and exception in the file. __main__.py is never imported as a submodule, so routing through it avoids the duplicate.

Functions

_build_parser(→ argparse.ArgumentParser)

_main(→ int)

Module Contents

fleche.__main__._build_parser() argparse.ArgumentParser[source]
fleche.__main__._main(argv: list[str]) int[source]