acres
Access resources on your terms
What it is and what it does
Acres wraps importlib.resources to provide a clearer, more predictable interface for accessing bundled package data. It solves the problem that importlib.resources returns Traversable objects that may or may not exist on the filesystem depending on whether the package is zipped, and that context managers like as_file() have inconvenient scoping when resource access is deferred. Acres offers three access patterns: cached() for interpreter-lifetime resources, as_path() for context-managed temporary access, and readable() for Path-like objects with read_text() and read_bytes() methods.
The package is designed to be used as a module-level loader in data packages, allowing submodules to expose a simple load_resource function that hides the complexity of resource access. It is fully type-annotated and tested against Python 3.9 through 3.13.
Use it for:
- Expose bundled configuration, template, or data files from a package submodule without exposing importlib complexity.
- Access resources that must exist on the filesystem (e.g., for passing to external tools) with guaranteed lifetime.
- Read small resource files (text or binary) from a package without managing temporary file cleanup.
- Handle packages that may be installed as zipped archives without code changes or runtime bugs.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Acres provides a consistent, scoped interface for accessing package resources across different installation contexts (zipped or unpacked), with support for temporary, context-managed, and interpreter-lifetime resource access.
Yes, if you have bundled package resources and want to avoid the complexity and scoping gotchas of importlib.resources directly. The low install friction, active maintenance, permissive license, and clear API make it a straightforward choice. Not necessary if you only occasionally access resources or are comfortable with importlib.resources's Traversable interface.
Install
acres on PyPI
pip
pip install acresuv
uv add acrespoetry
poetry add acresInstalling acres
Before you install
Low friction: pure Python wheel with a single lightweight dependency (importlib_resources). Active maintenance with recent releases; last commit 2026-08-01.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install acres
from acres import Loader
loader = Loader('mypackage')
resource_text = loader.readable('data/file.txt').read_text()
Requires Python 3.9 or later.
Verify before relying
- Whether the package is actively used by projects beyond its originating organization (stars are 0, but monthly downloads are 549731).
- Performance characteristics when accessing many resources or large files.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — importlib_resources |
| Maintenance | actively maintained — 436 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 549,731/month — #6,054 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: acres-0.5.0-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
importlib-resourcesProvides a backport of Python's standard…
permissive · top 1,000 on PyPI
rootutilsFinds your project root directory and…
permissive · top 15,000 on PyPI
tempenvTemporarily override environment variables…
permissive · top 15,000 on PyPI
pkginfoExtracts and queries package metadata from…
permissive · top 1,000 on PyPI
pathProvides Path objects that wrap filesystem…
permissive · top 5,000 on PyPI
dotenvLoads environment variables from a .env file…
unclear · top 5,000 on PyPI
pathlib-abcProvides abstract base classes for implementing…
permissive · top 1,000 on PyPI
platformdirsDetermines platform-specific directories for…
permissive · top 100 on PyPI
path.pyProvides Path objects that wrap filesystem…
permissive · top 15,000 on PyPI
setuptools-odooSetuptools-odoo automates packaging of Odoo…
copyleft · top 15,000 on PyPI