skillfed

acres

Access resources on your terms

acres v0.5.0 549.7K downloads/30d#6,054 on PyPI0
Permissive license Apache-2.0 Active released

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 acres

uv

uv add acres

poetry

poetry add acres

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

package resource accessread bundled data filesimportlib resources wrapperzipped package resourcespathlib resource loading
package-resourcesimportlib-wrapper

More Software Development packages