{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/7"}],"enrichment":{"capability":"Detects a Python project or package root directory by scanning for typical marker files and folders, and optionally adds that path to sys.path to resolve import issues.","skillfed_tags":["path-detection","import-resolution","project-utilities"],"use_cases":["Detect project root in a multi-level package structure to enable consistent absolute imports from any nested module.","Add project root to sys.path in test runners or utility scripts to avoid import errors when executed from different directories.","Resolve import paths in research or data-science projects where scripts may be run from various working directories.","Configure logging or resource paths relative to the detected project root rather than the current working directory."],"what_it_does":"Rootpath is a utility library that automatically detects the root directory of a Python project by looking for common marker files and folders such as `.git`, `requirements.txt`, `setup.py`, and others. It works from any nested module within the project and returns the detected root path. The package also provides a helper function to prepend the root path to `sys.path`, which can simplify module imports across a project without relying on relative imports.\n\nThe library is designed to solve the problem of Python's import system becoming fragile when scripts are run from different working directories. By detecting and adding the project root to the module search path, it allows imports to work consistently regardless of where a script is executed from. The detection logic can be overridden if the default markers don't match your project structure.","worth_installing":"No. While the package is simple and has low install friction, it is abandoned (last release 2019, last commit 2022) and will not receive updates. For new projects, consider using modern alternatives like `importlib.resources` or `pathlib` with `__file__` inspection, or rely on proper package installation and relative imports. Only install if you are maintaining legacy code that already depends on it."},"id":"rootpath","links":{"html":"https://skillfed.io/packages/rootpath","md":"https://skillfed.io/packages/rootpath.md","pypi":"https://pypi.org/project/rootpath/"},"maintenance":{"status":"abandoned"},"meta":{"latest_release":"2019-03-10","license_spdx":null,"license_treatment":"permissive","name":"rootpath","python_support":"unspecified","summary":"Python project/package root path detection."},"popularity":{"monthly_downloads":203079,"position":9638,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.1.1"}
