INIT - Python [PKG1]#
main
#
MyMain
#
Main class for pkg1.
This class serves as the entry point for pkg1 functionality. It demonstrates how the package can coordinate different components (e.g., sub modules and external utilities).
run() -> None
#
Execute the demo flow of pkg1.
The function joins a static list of words via :class:MySub,
passes the resulting string to :class:MyMain, and finally
calls the :func:main function from shared_utils.hello.
Source code in packages/pkg1/src/pkg1/main.py
sub
#
sub
#
MySub
#
Utility helper that simply echoes a list of strings.
This lightweight class demonstrates how a sub-package can expose small building blocks that other parts of the application (or external consumers) can use.
method_sub(arg: list[str]) -> list[str]
#
Return the supplied list unchanged.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
list[str]
|
A list of strings that will be returned verbatim. |
required |
Returns:
| Type | Description |
|---|---|
list[str]
|
list[str]: The same list that was passed in. |
Notes
This method does not modify the input list and simply
forwards it. It exists only to provide a concrete
implementation for the pkg1.main module to call.
Source code in packages/pkg1/src/pkg1/sub/sub.py
INIT - Python [shared]#
hello
#
main() -> None
#
Prints a simple greeting from the shared utilities package.
This function is intended as a lightweight demo to show that the shared_utils
sub-package is correctly installed and importable from other packages
in the monorepo.