Python SDK for the Musher bundle distribution platform
Project description
Musher Python SDK
Python SDK for the Musher bundle distribution platform. Pull versioned AI agent asset bundles (prompts, configs, tool definitions) into your Python applications.
Installation
pip install musher-sdk
Quick Start
import musher
# Explicit token
musher.configure(token="your-token")
bundle = musher.pull("myorg/my-bundle:1.0.0")
for asset in bundle.files():
print(f"{asset.logical_path}: {len(asset.text())} chars")
Async
async with musher.AsyncClient() as client:
bundle = await client.pull("myorg/my-bundle:1.0.0")
Sync
with musher.Client() as client:
result = client.resolve("myorg/my-bundle:1.0.0")
asset = client.fetch_asset("asset-id", version="1.0.0")
Configuration
Credential Chain
The SDK resolves credentials automatically in this order:
- Environment variables —
MUSHER_API_KEY - OS keyring — host-scoped service
musher/{hostname} - File fallback —
<data_dir>/credentials/<host_id>/api-key(must be0600permissions)
Registry URL
The registry URL is resolved from environment variables:
MUSHER_API_URL- Default:
https://api.musher.dev
Programmatic Configuration
import musher
# All parameters are optional — omitted values auto-discover
musher.configure(
token="your-token",
registry_url="https://custom.dev",
cache_dir=Path("/tmp/cache"),
)
Cache Behavior
The SDK uses a content-addressable disk cache:
- Blobs are stored by SHA-256 hash (shared across registries)
- Manifests and refs are partitioned by registry hostname
- Manifests have a configurable TTL (default 24h); refs default to 5min
clean()removes expired entries and garbage-collects unreferenced blobs
What's Implemented
resolve()— resolve bundle references to manifestsfetch_asset()— fetch individual assets by IDpull()— resolve + fetch all assets + verify checksums- Sync (
Client) and async (AsyncClient) clients - Content-addressable cache with TTL and garbage collection
- Typed handles: skills, prompts, toolsets, agent specs
export_claude_plugin()— export bundle as a Claude plugininstall_claude_skills()— install skills to a directory
License
Apache-2.0
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file musher_sdk-0.2.0.tar.gz.
File metadata
- Download URL: musher_sdk-0.2.0.tar.gz
- Upload date:
- Size: 195.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b143ff1f0389e9aee53e7aa7ca24984aa1c89a9bf1777f5f51cb57aa6236341
|
|
| MD5 |
f49ce7b1598625a8a8a191dc44a61633
|
|
| BLAKE2b-256 |
55a01dcf20dbcb3a59aaf5fb46420576b9758058dbc954e34ff0ebb97a3daa0c
|
Provenance
The following attestation bundles were made for musher_sdk-0.2.0.tar.gz:
Publisher:
release.yml on musher-dev/python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
musher_sdk-0.2.0.tar.gz -
Subject digest:
5b143ff1f0389e9aee53e7aa7ca24984aa1c89a9bf1777f5f51cb57aa6236341 - Sigstore transparency entry: 1175460640
- Sigstore integration time:
-
Permalink:
musher-dev/python-sdk@c8b6a4c3c14649d55267506998232c899d8fc1b2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/musher-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c8b6a4c3c14649d55267506998232c899d8fc1b2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file musher_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: musher_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 26.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d5c7a13a914d7fc86955fd2f658d7f8b7cdf2a46b7781adea599f1178a728ed
|
|
| MD5 |
f8d8aad18e0246e570fe1bb6d6fed5f4
|
|
| BLAKE2b-256 |
3a31bdb8a6e734a9b813633d61d9d739f645734898d2b860a354adeb714c7b09
|
Provenance
The following attestation bundles were made for musher_sdk-0.2.0-py3-none-any.whl:
Publisher:
release.yml on musher-dev/python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
musher_sdk-0.2.0-py3-none-any.whl -
Subject digest:
5d5c7a13a914d7fc86955fd2f658d7f8b7cdf2a46b7781adea599f1178a728ed - Sigstore transparency entry: 1175460641
- Sigstore integration time:
-
Permalink:
musher-dev/python-sdk@c8b6a4c3c14649d55267506998232c899d8fc1b2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/musher-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c8b6a4c3c14649d55267506998232c899d8fc1b2 -
Trigger Event:
push
-
Statement type: