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.2.tar.gz (6.8 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.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for assetkit-0.1.2.tar.gz
Algorithm Hash digest
SHA256 dace0ebebf70e881c451470199da81b83ccc8251dbe1ed7c536e67be41d28ba7
MD5 d20f2ec923f516fd0bf1b19d0b25b0b4
BLAKE2b-256 fd989667e2692efdc30aabb71f6f91350410a7c83d53a7cd2694afeaf765dbff

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for assetkit-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 25765730c998bce6a7ad61a5522383bf21fd0365bf905648199d4a8e72773df7
MD5 268cd400ea20c88619e4117ca1d76ef2
BLAKE2b-256 19811b0c03cd3a1b22dbb56efd227030589bf7d544ffc4e5c540ea5f2f3f857e

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