detect_py_dependencies: Detect Python package dependencies from requirements files

View source: R/dependencies-python.R

detect_py_dependenciesR Documentation

Detect Python package dependencies from requirements files

Description

Reads requirements.txt or pyproject.toml to determine Python package dependencies. Does NOT parse import statements – the module-name-to-package-name mapping (e.g., ⁠import cv2⁠ maps to opencv-python) makes import parsing unreliable.

Usage

detect_py_dependencies(appdir)

Arguments

appdir

Character string. Path to the app directory.

Details

Prefers requirements.txt over pyproject.toml when both exist. Warns if neither file is found, or if pyproject.toml has no packages in the dependencies of its ⁠[project]⁠ table.

Value

Character vector of unique package names (sorted).


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