Skip to main content

A Python toolkit for managing runtime asset packages

Project description

AssetKit

A Python toolkit for packaging, discovering, and loading structured runtime assets.

PyPI version License


🚀 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

assetkit-0.1.8.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

assetkit-0.1.8-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file assetkit-0.1.8.tar.gz.

File metadata

  • Download URL: assetkit-0.1.8.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for assetkit-0.1.8.tar.gz
Algorithm Hash digest
SHA256 340a1f22b6e79bc753a75a90d426aedfbe044895fdd9248b60d171fd5d85d16c
MD5 6fb9d15729b0db2e0cf8e93ba7e2aba0
BLAKE2b-256 03eef2845857883c17413e8dc637c07890f8d141bae7396e6e3aee8dfb34e914

See more details on using hashes here.

File details

Details for the file assetkit-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: assetkit-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for assetkit-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 36d16c1d944caa4968139e1543b5536ac903871145955dd1fa21cd90c515e832
MD5 d5b0f0dce2861eb72f223c4afafb0529
BLAKE2b-256 99425ad9d3b5741f0724de898054101f8831830ffb6f21b78c0857366d1a4ccc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page