📦 AssetKit
A Python toolkit for packaging, discovering, and loading structured runtime assets.
🚀 Features
- ✅ Structured asset packaging with a clean
resources/assets/convention - ✅
AssetManager: Pythonic runtime asset access interface - ✅ Optional
assets.pyauto-generated mapping with dot-access convenience - ✅ CLI scaffolding for reusable asset packages and app templates
- ✅ Optional asset injection at creation (
--add <files/dirs>) - ✅ Optional
--installafter generation - ✅ Optional
--gen-assets-pyto include reusableassets.pyfor import - ✅ Auto-discovery of installed asset packages via
entry_points - ✅ Fully pip-installable — no source directory needed at runtime
- ✅ Supports plain files, binaries, even GitHub repositories
📦 Installation
pip install assetkit
During development:
pip install -e .
🛠 CLI Usage
Create a new asset package:
assetkit new my_assets
Add asset files or folders 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
Also generate reusable assets.py mapping file:
assetkit new my_assets --gen-assets-py
Put it all together
assetkit new my_assets --add myfile.txt --gen-assets-py --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
├── assets.py <-- optional, auto-generated
└── resources/
└── assets/
├── config/
│ └── model.yaml
├── data/
│ └── sample.csv
└── myfile.txt
⚡ Quick Python Usage Example
Manual access via AssetManager:
from assetkit.asset_manager import AssetManager
assets = AssetManager(package_root="my_assets", resource_dir="resources/assets")
print(assets.list()) # List all available assets
print(assets["config/model.yaml"].text()) # Read file contents
Auto-importable mapping via assets.py (if generated):
from my_assets.assets import assets
print(assets.config_model_yaml.text())
print(assets.data_sample_csv.text())
print(assets.myfile_txt.path()) # Full file path
🔍 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 my_assets.assets import assets
print(assets.config_model_yaml.text())
Or with raw AssetManager if no assets.py:
from assetkit import AssetManager
assets = AssetManager(package_root="my_assets", resource_dir="resources/assets")
print(assets.list())
🐳 Dockerized Example (Optional)
FROM python:3.12-slim
RUN pip install assetkit
WORKDIR /app
RUN assetkit new my_assets --add /dev/null --gen-assets-py
WORKDIR /app/my_assets
RUN pip install .
CMD ["python", "-c", "from my_assets.assets import assets; print(assets.myfile_txt.text())"]
📄 License
MIT — See LICENSE
📬 More Info
🏁 Roadmap (Coming Soon)
assetkit bundleandassetkit extractCLI tooling- Language-agnostic
assetkit.yamlasset manifests assetkit.ext.yaml,assetkit.ext.pandashelpers- CLI dispatch of packaged binary tools (
assetkit run <tool>) - GitHub Actions publishing workflows
- Plugin-style extension system for asset loaders
Metadata
Release files for assetkit 0.1.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| assetkit-0.1.16.tar.gz | 13.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| assetkit-0.1.16-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.9 kB
Release files / assetkit-0.1.16.tar.gz
| Download URL | assetkit-0.1.16.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e02e8494a8908f1d74ff41b6b6cc6d454df9393b65ac4036d14dca3726313157
|
|
BLAKE2b-256 checksum How to use checksums |
45f6019ccfc1ef18cffaffe0d25e86328ba35e457500bd7571109a3cb4122975
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / assetkit-0.1.16-py3-none-any.whl
| Download URL | assetkit-0.1.16-py3-none-any.whl |
|---|---|
| Size | 15.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f579ebcbb664b890046af655a2c407f2606ff42a6a17c6b579c723ce23f644c
|
|
BLAKE2b-256 checksum How to use checksums |
60058a2dd76858e371cde9d9e561f450c17c4fa0f73b47dde6172390c1eb7538
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for assetkit 0.1.16
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.