Skip to main content

Rune Icon
rune

GitHub: rune License: MIT

Overview

A Python library for zero-configuration, OS-independent asset management. It automatically discovers and provides an intuitive API to access project files, eliminating the need for hardcoded relative paths or complex configuration.

Built on top of Python's native pathlib, rune eliminates boilerplate code related to path management. It adapts to your existing project structure, allowing you to focus on your application's logic instead of worrying about file locations.

Key Features

  • Zero Configuration: Works out-of-the-box by automatically detecting your project root and common asset directories (assets/ or resources/).
  • Intuitive, Pythonic API: Access your assets as if they were Python objects (assets.images.player_icon).
  • Cross-Platform Reliability: Identical behavior across Windows, macOS, and Linux.
  • pathlib Integration: Returns standard pathlib.Path objects for full compatibility with modern Python libraries.
  • Path-like Behavior: Supports natural path joining with the / operator (assets.fonts / "main.ttf").
  • Excellent Developer Experience: Provides clear, helpful error messages with suggestions for typos.

Installation

uv add rune

Quick Start

Imagine you have the following project structure:

my_awesome_project/
├── resources/
│   ├── images/
│   │   ├── player.png
│   │   └── background.jpg
│   └── fonts/
│       └── main.ttf
└── src/
    └── main.py

In main.py, you can access your assets like this:

NOTE: The asset paths are resolved relative to the project root, making it easy to manage assets without worrying about their physical locations. NOTE: The asset paths are case-insensitive, allowing for flexible access regardless of the original file naming. NOTE: The name rune is used as a namespace for now... I'm looking for a way to use it if possible, if not I'll just change the name of the pkg to something that fits better!

from rune import assets

# Get the path to the player image
player_image_path = assets.images.player

# You can also use the / operator to join paths
main_font_path = assets.fonts / "main.ttf"

print(f"Player image: {player_image_path}")
print(f"Main font: {main_font_path}")

API Behavior

rune dynamically maps your directory structure to a Python object.

  • Directory Access: assets.images maps to the first discoverable directory named images/.
  • File Access: assets.images.player maps to the file images/player.png. The file extension is optional and normalized.
  • Path Joining: assets.images / "enemies/goblin.png" works just like pathlib.
  • Iteration: for file in assets.images: print(file) allows you to iterate over contents.

Usage Examples

See the examples directory for complete sample applications demonstrating various project layouts and use cases.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for manifold 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for manifold 0.0.1
File Size Uploaded
manifold-0.0.1.tar.gz 25.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for manifold 0.0.1
File Interpreter ABI Platform
manifold-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 34.8 kB

Release files / manifold-0.0.1.tar.gz

Download URL manifold-0.0.1.tar.gz
Size 25.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d9a456abbe29c997a808ad0efd7c08a8ef2c5e78277a4353d57abcf6b8004bbb
BLAKE2b-256 checksum
How to use checksums
0b8127ade41174ac34a7456674a013f848219b65acfe137b7f4af3f2ee5356b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"25.11","id":"xantusia","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / manifold-0.0.1-py3-none-any.whl

Download URL manifold-0.0.1-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2fccea391efddf62ebaefeac7a8ef3677b1d515a32b588fa836f4858d56fcd34
BLAKE2b-256 checksum
How to use checksums
d06ebc384a1a0c509257c4b835cb3daee19a9ba84abfbb612ab3667ec689f462
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"25.11","id":"xantusia","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page