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 CI Coverage


๐Ÿš€ Features

  • โœ… Structured asset packaging with a clean resources/assets/ convention
  • โœ… AssetManager: Pythonic runtime asset access interface
  • โœ… CLI scaffolding for creating reusable asset packages and app templates
  • โœ… Optional asset injection at creation (--add <files/dirs>)
  • โœ… Optional install-after-generation (--install)
  • โœ… Auto-discovery of installed asset packages via entry_points
  • โœ… Fully pip-installable asset bundles โ€” no runtime source directory needed
  • โœ… Works with plain files, binaries, or entire GitHub repositories

๐Ÿ“ฆ Installation

pip install assetkit

During development:

pip install -e .

๐Ÿ›  CLI Usage

Create a new asset package:

assetkit new my_assets

With additional asset files or folders injected at creation time:

assetkit new my_assets --add /path/to/data.csv /path/to/config/

Auto-install the package after creation:

assetkit new my_assets --install

Scaffold an AI/ML application project:

assetkit scaffold mlkit my_app_project

๐Ÿ“‚ Example Asset Package Structure

my_assets/
โ”œโ”€โ”€ pyproject.toml
โ”œโ”€โ”€ setup.cfg
โ”œโ”€โ”€ MANIFEST.in
โ””โ”€โ”€ my_assets/
    โ”œโ”€โ”€ __init__.py
    โ””โ”€โ”€ resources/
        โ””โ”€โ”€ assets/
            โ”œโ”€โ”€ config/
            โ”‚   โ””โ”€โ”€ model.yaml
            โ”œโ”€โ”€ data/
            โ”‚   โ””โ”€โ”€ sample.csv
            โ””โ”€โ”€ github_repo/
                โ””โ”€โ”€ ...

โšก Quick Python Usage Example

from assetkit.asset_manager import AssetManager

assets = AssetManager(package_root="my_assets", resource_dir="resources/assets")
print(assets.list())  # List available assets
print(assets["config/model.yaml"].text())  # Read asset file

๐Ÿ” Discover All Installed Asset Packages

from assetkit.discovery import discover_asset_managers

packages = discover_asset_managers()
for name, assets in packages.items():
    print(f"{name}: {assets.list()}")

๐Ÿงช Testing an Installed Asset Package

After creating and installing:

cd my_assets
pip install .

Then test in Python:

from assetkit import AssetManager
assets = AssetManager(package_root="my_assets", resource_dir="resources/assets")
print(assets.list())

๐Ÿณ Dockerized Example (Optional)

You can build reproducible asset packages in Docker:

FROM python:3.12-slim
RUN pip install assetkit
WORKDIR /app
RUN assetkit new my_assets
RUN mkdir -p /app/my_assets/my_assets/resources/assets && echo "Hello" > /app/my_assets/my_assets/resources/assets/hello.txt
WORKDIR /app/my_assets
RUN pip install .
CMD ["python", "-c", "from assetkit import AssetManager; assets = AssetManager(package_root='my_assets', resource_dir='resources/assets'); print(assets.list())"]

๐Ÿ“„ License

MIT โ€” See LICENSE


๐Ÿ“ฌ More Info


๐Ÿ Coming Soon (Roadmap)

  • assetkit bundle and assetkit extract CLI tools
  • YAML and pandas extensions (assetkit.ext.*)
  • Language-agnostic manifest support via assetkit.yaml
  • Cross-platform asset publishing and usage

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.14.tar.gz (11.9 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.14-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: assetkit-0.1.14.tar.gz
  • Upload date:
  • Size: 11.9 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.14.tar.gz
Algorithm Hash digest
SHA256 5ca0782e37df80533343f0071233403aa2304c3e8d610c8beec97902f9e438ec
MD5 2c3ebeb6a0e61d5324b4eeb53664616c
BLAKE2b-256 1baa58d3b89b3facf1b5fb82996e1e4a5a165cb8bdcdb6fdece4d4bc1913a5fc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: assetkit-0.1.14-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

Hashes for assetkit-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 8ad5e19a604d350a52accf22c1118a35e8e1a997df2ec31429080653bb2e8066
MD5 71cec0dfae4c85fbbab3b7de50267002
BLAKE2b-256 7d6659f397b878c1b64d5844bc0ae2133f39b69bca36d596edf36066ddabe3db

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