bazel-runfiles
Decision gist · record as of 2026-08-14
Yes, if you are building Python binaries or tests with Bazel and need to access runfiles at runtime. The package is actively maintained, has no dependencies, and carries a permissive license. It is essential infrastructure for Bazel-Python integration but only relevant within a Bazel project; installing it outside that context is unnecessary.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.7 or later.
- Only useful within a Bazel-built project that generates runfiles; requires proper Bazel environment variables to be set.
- Low install friction with no runtime dependencies.
License · maintenance · safety
permissive license (permissive) — Permissive license (Apache Software License) allows use in commercial and proprietary projects without significant restrictions.
last release 2026-08-14 (0 days) · last repo commit 2026-08-14 · 685 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,069,741 downloads/mo, #2,174 on PyPI
Alternatives
Verify before relying
pip install bazel-runfiles
from runfiles import Runfiles
r = Runfiles.Create()
path = r.Rlocation("my_workspace/path/to/data.txt")
with open(path, "r") as f:
contents = f.readlines()- Whether the package works correctly outside a Bazel-managed build environment or with older Bazel versions.
- Performance characteristics when dealing with large numbers of runfiles or deeply nested directory structures.
What it is and what it does
bazel-runfiles is a lookup library that helps Python code find and access files and binaries that Bazel has packaged as runfiles. When Bazel builds a Python binary or test, it stages dependencies and data files in a runfiles tree; this library provides the API to locate those files at runtime using either a manifest file or a directory structure, depending on the Bazel configuration.
The library is designed for use within Bazel-built projects. You create a Runfiles object, then call its Rlocation method with a workspace-qualified path to get the actual filesystem location of a runfile. It also supports setting up environment variables for subprocesses that need to access runfiles themselves. The implementation automatically detects whether to use manifest-based or directory-based lookup based on environment variables set by Bazel.
Use it for
- Access data files packaged alongside a Bazel-built Python binary at runtime.
- Locate and run other Bazel-built binaries from within a Python test or application.
- Set up environment variables for subprocesses spawned by a Bazel-built Python program so they can find their own runfiles.
- Resolve workspace-qualified paths to actual filesystem paths in a Bazel build system.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are building Python binaries or tests with Bazel and need to access runfiles at runtime.
The package is actively maintained, has no dependencies, and carries a permissive license. It is essential infrastructure for Bazel-Python integration but only relevant within a Bazel project; installing it outside that context is unnecessary.
Install
bazel-runfiles on PyPI
Before you install
Low install friction with no runtime dependencies. Active maintenance as of 2026-08-14 with recent releases. Stable production status.
Requires Python 3.7 or later. Only useful within a Bazel-built project that generates runfiles; requires proper Bazel environment variables to be set.
License in practice
Permissive license (Apache Software License) allows use in commercial and proprietary projects without significant restrictions.
Quickstart
pip install bazel-runfiles
from runfiles import Runfiles
r = Runfiles.Create()
path = r.Rlocation("my_workspace/path/to/data.txt")
with open(path, "r") as f:
contents = f.readlines()
Verify before relying
- Whether the package works correctly outside a Bazel-managed build environment or with older Bazel versions.
- Performance characteristics when dealing with large numbers of runfiles or deeply nested directory structures.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,069,741 / month, #2,174 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/StableLicense :: OSI Approved :: Apache Software License |
Evidence: bazel_runfiles-2.3.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 › “bazel runfiles lookup”
- bazel-runfilesProvides a Python API to locate and access runfiles (data files and…
- nanopbNanopb is a code generator and runtime library that compiles Protocol…
- pyasnpyasn performs fast offline IP address to Autonomous System Number…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also absl-py · locate · subprocess.run · emport · invoke · deno · runs · PyQt6-Qt6 · PyTestArch · intel-cmplr-lic-rt