saturnin._scripts.commands.pkg

Typer commands for managing Saturnin components and Python packages within its environment.

This includes listing and inspecting registered services and applications, updating Saturnin’s component registries, and wrappers around pip for installing and uninstalling packages while ensuring registry consistency.

Globals

saturnin._scripts.commands.pkg.app

Typer command group for package management commands

Parameters:
Return type:

Any

Command functions

saturnin._scripts.commands.pkg.install_package(args: ~typing.Annotated[list[str], <typer.models.ArgumentInfo object at 0x799ce46280d0>])[source]

Installs or upgrades Python packages in Saturnin’s virtual environment using ‘pip’.

After the pip operation, Saturnin’s component registries (services, applications) are automatically updated to reflect any changes. This command is recommended for managing packages that provide Saturnin components.

Supports all standard pip install options, including upgrading packages (e.g., using -U or --upgrade).

Parameters:

args (Annotated[list[str], <typer.models.ArgumentInfo object at 0x799ce4628350>])

saturnin._scripts.commands.pkg.uninstall_package(args: ~typing.Annotated[list[str], <typer.models.ArgumentInfo object at 0x799ce47bea10>])[source]

Uninstalls Python packages from Saturnin’s virtual environment using ‘pip’.

After the pip operation, Saturnin’s component registries (services, applications) are automatically updated. This command is recommended for removing packages that provide Saturnin components.

The --yes option is automatically passed to pip uninstall to avoid interactive prompts from pip.

Parameters:

args (Annotated[list[str], <typer.models.ArgumentInfo object at 0x799ce47bd6d0>])

saturnin._scripts.commands.pkg.pip(args: ~types.Annotated[list[str] | None, <typer.models.ArgumentInfo object at 0x799ce47e3ad0>] = None)[source]

Runs the ‘pip’ package manager within Saturnin’s virtual environment.

This command acts as a direct passthrough to pip, allowing access to all its functionalities (e.g., pip search, pip show, pip freeze).

For installing or uninstalling packages that provide Saturnin components, it’s generally recommended to use the more specific install-package and uninstall-package commands. These ensure that Saturnin’s internal component registries are updated automatically.

However, if pip install or pip uninstall are invoked via this generic pip command, Saturnin will subsequently attempt to update its component registries to reflect potential changes.

The output of pip --help (or help for any pip subcommand) is also available by passing the respective arguments.

Parameters:

args (Annotated[list[str] | None, <typer.models.ArgumentInfo object at 0x799ce460c7d0>])

saturnin._scripts.commands.pkg.list_services(with_name: ~typing.Annotated[str, <typer.models.OptionInfo object at 0x799ce4697ed0>] = '')[source]

Lists Saturnin services registered in the local environment.

Parameters:

with_name (Annotated[str, <typer.models.OptionInfo object at 0x799ce4697f90>])

saturnin._scripts.commands.pkg.show_service(service_id: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x799ce46adb90>] = '')[source]

Shows detailed information about a specific registered Saturnin service.

Parameters:

service_id (Annotated[str, <typer.models.ArgumentInfo object at 0x799ce4601410>])

saturnin._scripts.commands.pkg.list_applications(with_name: ~typing.Annotated[str, <typer.models.OptionInfo object at 0x799ce4619ad0>] = '')[source]

Lists Saturnin applications registered in the local environment. Includes an indicator if the application is currently used by any installed recipe.

Parameters:

with_name (Annotated[str, <typer.models.OptionInfo object at 0x799ce4619890>])

saturnin._scripts.commands.pkg.show_application(app_id: ~typing.Annotated[str, <typer.models.ArgumentInfo object at 0x799ce461b090>] = '')[source]

Shows detailed information about a specific registered Saturnin application.

Parameters:

app_id (Annotated[str, <typer.models.ArgumentInfo object at 0x799ce4619e10>])

saturnin._scripts.commands.pkg.list_packages()[source]

Lists installed distribution packages that provide Saturnin components.

This command does not list ALL packages installed in Saturnin’s virtual environment, but only those that have registered Saturnin services or applications. To list all installed packages, use the pip list command.

saturnin._scripts.commands.pkg.update_registry()[source]

Updates Saturnin’s registries of installed services and applications.

The registries are updated automatically when Saturnin packages are managed with the built-in install-package, uninstall-package, or pip install/uninstall commands. Manual update is required only when packages are added, updated, or removed in a different way (e.g., using an external pip directly or manually altering the Python environment).