boot_vs_start¶
Intro¶
There are two distinct use cases of the protoprimer:
bootstrap an environment: boot_env
Prepare
venvand pass control to custom client bootstrap steps.The case is indicated by
EntryFunc.func_boot_env(see entry_func).start an application: start_app
Assume
venvis prepared, switch to requiredpythonand start custom client main function.The case is indicated by
EntryFunc.func_start_app(see entry_func).
In both cases, in order to import anything, the protoprimer transition itself into
isolated_python inside required venv.
TODO: TODO_03_22_24_33.consolidate_sub_command_and_entry_func_docs.md:
These use cases partially obsolete app_vs_lib
because there seem to be no way proto_code can be
considerably useful during proto primer_runtime -
nothing for lib except launching an app as env bootstrapper or app starter.
The lib functionality may still be useful but during meta primer runtime.
main function and help on args¶
Ultimately, the symptom of the choice (whether proto_code is used as boot_env or start_app)
manifests itself in the help output that script provides (what set of args its main function expects):
path/to/script -h
The reason for that is required CLI_compatibility.
How to extend and customize it?¶
TODO: Explain examples ./cmd/boot_env and ./cmd/start_app