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.12.tar.gz (12.0 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.12-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: assetkit-0.1.12.tar.gz
  • Upload date:
  • Size: 12.0 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.12.tar.gz
Algorithm Hash digest
SHA256 cd589d9aa2bf0aea1f97d26675362baec98e3b798f2f024cd0039ea2bd45e391
MD5 7a79bd5916d581ae1452307d1221a668
BLAKE2b-256 ef36a8d6fe4400871d214e1bacf5565f54f3698529b4162918caffcebe1b2cb6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: assetkit-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 19.2 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.12-py3-none-any.whl
Algorithm Hash digest
SHA256 6fc7eb0848757474d69a9b009dd4cb6cffc481c00ff5266b9a78719db8177330
MD5 977a8745629d2d2fa147bfde82309c6a
BLAKE2b-256 d2aef6934c0b17253b3f49e96b160127f35561329fc12f85d5694fd5f8230a46

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