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 0x7092a3376a50>])[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 0x7092a3342110>])

saturnin._scripts.commands.pkg.uninstall_package(args: ~typing.Annotated[list[str], <typer.models.ArgumentInfo object at 0x7092a3228310>])[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 0x7092a322ae10>])

saturnin._scripts.commands.pkg.pip(args: Annotated[list[str] | None, <typer.models.ArgumentInfo object at 0x7092a3228150>]=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 0x7092a322ac10>])

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

Lists Saturnin services registered in the local environment.

Parameters:

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

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

Shows detailed information about a specific registered Saturnin service.

Parameters:

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

saturnin._scripts.commands.pkg.list_applications(with_name: Annotated[str, <typer.models.OptionInfo object at 0x7092a320bf90>]='')[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 0x7092a3209bd0>])

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

Shows detailed information about a specific registered Saturnin application.

Parameters:

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

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).