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.3.tar.gz (8.4 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.3-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: assetkit-0.1.3.tar.gz
  • Upload date:
  • Size: 8.4 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.3.tar.gz
Algorithm Hash digest
SHA256 ccd0111537271d9fe6e9b7786ee50d530bb15ec25533d396b3582eb0be58172d
MD5 04c7dd714cde7b7da1788eb2225bdf23
BLAKE2b-256 e1f854f18844e35914bb443cf4326fb0b582418e6892672593a013186cc8ec0a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: assetkit-0.1.3-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.8

File hashes

Hashes for assetkit-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f084cba072b06df80f24bed9433e44c6c0199d1a7c548777362b796d8603c7c2
MD5 d2c98ad225ee91f5f800f75595cdfab6
BLAKE2b-256 a40613aaf26eeaad155b04a14a317001e913a61d058142dedc76b69e5ff5cd9a

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