--- id: pyprojroot version: "0.3.0" license: unclear license_treatment: permissive maintenance: abandoned --- # pyprojroot — Project-oriented workflow in Python License: permissive · Maintenance: abandoned · Downloads: 348.4K/mo ## What it is and what it does pyprojroot solves the working-directory problem in data science and research workflows: when you run scripts from different directories or use Jupyter notebooks (which change the working directory to the notebook's location), relative file paths break. This package finds your project root by looking for markers like .git, .here, or pyproject.toml, then provides a `here()` function that returns a pathlib.Path object for any file relative to that root. You call `here('data/myfile.csv')` instead of `../data/myfile.csv`, and the path stays valid no matter where you run the code from. The package has two interfaces: an interactive `here()` function (inspired by the R `here` package) for quick use in notebooks, and a programmatic `find_root()` API (inspired by R's `rprojroot`) for more control over how the root is detected. It depends only on typing-extensions and installs with minimal friction. However, the project is abandoned—last updated in March 2023—so it receives no new features or maintenance, though the core functionality is stable. Use it for: - Access data files in Jupyter notebooks without rewriting paths when you move notebooks between folders. - Write scripts that work correctly whether called from the project root or from a subdirectory. - Build reproducible workflows where file paths are absolute from project root, not relative to script location. - Manage projects with nested folder structures (data/, notebooks/, src/) without hardcoding relative paths. - Avoid path-related bugs when refactoring project structure—only data location changes require path updates. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Finds your project's root directory and provides a `here()` function to construct file paths relative to that root, regardless of your current working directory. Yes, if you work in data science or research with Jupyter notebooks and project-oriented workflows. The package is small, stable, and solves a real pain point. However, the abandoned maintenance status means you should treat it as a utility you own—no updates will arrive if Python or your environment changes significantly. For new projects, verify that the root-detection markers (like .git) align with your project structure. ## Install pip install pyprojroot uv add pyprojroot poetry add pyprojroot ## Installing pyprojroot Before you install: Low friction install with a single runtime dependency (typing-extensions). Maintenance is abandoned—last release was 2023-03-13, over 1250 days ago—so expect no bug fixes or updates, though the package is stable for its narrow scope. License in practice: MIT license (permissive) means you can use this freely in commercial and private projects with minimal restrictions. Quickstart: pip install pyprojroot from pyprojroot.here import here path = here('data/myfile.csv') Requires Python 3.7 or later. Project root detection relies on finding markers like .git, .here, or pyproject.toml in a parent directory. Verify before relying: - Whether the package correctly detects project roots in monorepo or nested project structures. - Performance impact when called repeatedly in tight loops or on deeply nested directory trees. - Compatibility with modern Python versions (3.11+) given the abandoned maintenance status. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 348.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags project root directory finder, relative paths from project root, jupyter notebook working directory, here function python, project-oriented workflow, data folder path resolution, cross-directory file access, data-science, jupyter-friendly, path-resolution [View on SkillFed](https://skillfed.io/packages/pyprojroot) · [View on PyPI](https://pypi.org/project/pyprojroot/)