parse_pyproject_toml: Parse pyproject.toml dependencies section

View source: R/dependencies-python.R

parse_pyproject_tomlR Documentation

Parse pyproject.toml dependencies section

Description

Simple parser for the ⁠[project] dependencies⁠ array in pyproject.toml, where PEP 621 lists runtime dependencies. dependencies arrays in other tables, such as Hatch's ⁠[tool.hatch.envs.*]⁠ environments, are ignored. Entries may use double or single quotes, and ⁠#⁠ comments are skipped. Does not handle complex TOML such as multi-line strings, a quoted ⁠["project"]⁠ header, or a dotted project.dependencies key.

Usage

parse_pyproject_toml(path)

Arguments

path

Character string. Path to pyproject.toml.

Details

A dependency that ⁠[tool.uv.sources]⁠ takes from git, a URL, a path, or a workspace member is a direct reference, and one it takes from a named uv index is listed in indexed.

Value

A list as read_py_requirements() returns.


shinyelectron documentation built on Dec. 3, 2026, 9:07 a.m.