A Python toolkit for managing runtime asset packages
Project description
AssetKit
A Python toolkit for packaging, discovering, and loading structured runtime assets.
🚀 Features
- Structured asset packaging with a clean
resources/convention - Auto-discovery of asset packages via
entry_points - Pythonic runtime asset access with
AssetManager - CLI scaffolding to create new asset packages
📦 Installation
pip install assetkit
⚡ Quick Example
from assetkit.asset_manager import AssetManager
assets = AssetManager(package_root="your_package", resource_dir="resources")
print(assets.list())
print(assets["config/main.yaml"].text())
To discover multiple asset packages dynamically:
from assetkit.discovery import discover_asset_managers
packages = discover_asset_managers()
for name, assets in packages.items():
print(name, assets.list())
🛠 Scaffolding a New Package
assetkit new myplugin
This creates a new Python package with an embedded resources/ directory and a sample main.py.
📂 Project Structure Example
myplugin/
├── pyproject.toml
├── main.py
└── myplugin/
├── __init__.py
└── resources/
├── config/
│ └── main.yaml
└── images/
└── test.jpg
🧪 Testing Asset Packages
After installing a package (pip install ./myplugin):
from assetkit.discovery import discover_asset_managers
assets = discover_asset_managers()["myplugin"]
print(assets.list())
📄 License
MIT — See LICENSE
📬 More Info
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file assetkit-0.1.11.tar.gz.
File metadata
- Download URL: assetkit-0.1.11.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
297a4e371f1a764972048d10e5c265178c60bc26ab600dfaae30a2c78a1dc27e
|
|
| MD5 |
221d2b6c56abd82a249e7ef4a82ac9df
|
|
| BLAKE2b-256 |
1e24c2d580054cd354390bb91074fb4083f722e77f556a47eb18396023c7c6ea
|
File details
Details for the file assetkit-0.1.11-py3-none-any.whl.
File metadata
- Download URL: assetkit-0.1.11-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81032acd32786ed46034e336e44642e748e37228fb3695c6d0bc2ccccf9b306e
|
|
| MD5 |
5165d4ae0c31ce21e4809786ea4bfbed
|
|
| BLAKE2b-256 |
639738e738cafe6829540a07c8aa36e79cc8b9a21930a173d4ba744841034173
|