Skip to content
Framework

Packages

package_set_add()

Add a package set's packages to the project's dependencies, and install them.

Packages the project already lists are left as they are. The rest are added to pyproject.toml as package_add() adds them. A GitHub package keeps its repository. Sets also stack at creation with new(package_sets=[...]).

Usage

package_set_add(set: str, *, install: bool = True) -> dict[str, list[str]]

Arguments

Name Type Default Description
set required str

A built-in package set for Python, such as "python-data-analysis" or "fastapi-python" (see package_sets_list()). When you are signed in to Framework Cloud, a handle such as "@yourname/lab-tools" adds one of your account's sets.

install bool True

Install the added packages now. With uv, False only updates pyproject.toml and uv.lock.

Value

{"added": [...], "present": [...]}: the packages added and those the project already listed.

Raises

  • FrameworkError: For an unknown set, a set for another language, or a failed install.

Search guides and reference for R, Python, Stata, the CLI, and Framework Cloud.