rootpath
Python project/package root path detection.
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a pure-Python wheel.
- However, the package is abandoned—last release was in 2019 and last commit in 2022—so it will not receive updates or security patches if issues arise.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2019-03-10 (2714 days) · last repo commit 2022-09-09 · 23 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 203,079 downloads/mo, #9,638 on PyPI
Alternatives
Verify before relying
import rootpath
# Detect project root from any nested module
root = rootpath.detect()
print(root) # e.g., '/home/me/projects/py-foo'
# Optionally add root to sys.path for easier imports
rootpath.append()- Whether the package correctly handles monorepos or projects with non-standard root markers.
- Performance impact when scanning deeply nested directory structures for root markers.
- Compatibility with modern Python versions beyond what classifiers declare.
What it is and 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.
The 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.
Use it for
- 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.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
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.
Install
rootpath on PyPI
Before you install
Low install friction with a pure-Python wheel. However, the package is abandoned—last release was in 2019 and last commit in 2022—so it will not receive updates or security patches if issues arise.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
import rootpath
# Detect project root from any nested module
root = rootpath.detect()
print(root) # e.g., '/home/me/projects/py-foo'
# Optionally add root to sys.path for easier imports
rootpath.append()
Verify before relying
- Whether the package correctly handles monorepos or projects with non-standard root markers.
- Performance impact when scanning deeply nested directory structures for root markers.
- Compatibility with modern Python versions beyond what classifiers declare.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 9 packagessixcoloredlogstermcolorcolour-runnerdeepdiffpygmentstoxcoveragecodecov |
| Maintenance | Abandoned 2,714 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 203,079 / month, #9,638 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 3Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries |
Evidence: rootpath-0.1.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “python project root detection”
- rootpathDetects a Python project or package root directory by scanning for…
- binsizeAnalyzes symbol sizes in compiled binaries by parsing ELF files and…
- pyrootutilsFinds your project root directory and configures Python paths,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also rootutils · pyrootutils · urllib3-secure-extra · locate · emport · lib-detect-testenv · pyinvoke · conda-inject · deptry · codefind