This release is a pre-release and may not be stable for production use.
pymergetic-wasmmod-cdn-client
Thin HTTP client for wasmmod-cdn
(urllib + Pydantic models for typed package contents).
PyPI: pymergetic-wasmmod-cdn-client
Import: pymergetic.wasmmod.cdn_client
| Component | Role | Repo |
|---|---|---|
| wasmmod | Runtime + pack tree | pymergetic-wasmmod/wasmmod · main |
| wasmmod-tools | Host CLI (optional CDN extras) | pymergetic-wasmmod/wasmmod-tools · main |
| wasmmod-test | External consumer sample | pymergetic-wasmmod/wasmmod-test · main |
| wasmmod-cdn | This package lives here — server + client | pymergetic-wasmmod/wasmmod-cdn · main / client/ |
| metalpython | Metal product µPy — rebuilt on the wasmmod engine | pymergetic/metalpython · main |
Use this from wasmmod / CI. Do not install pymergetic-wasmmod-cdn just to publish — that pulls the FastAPI server stack.
Install
# alphas need --pre until a stable release
pip install --pre pymergetic-wasmmod-cdn-client
# from this monorepo (sources under ../pymergetic/wasmmod/cdn_client):
pip install --pre 'pymergetic-wasmmod-tools>=0.1.0a1'
pip install -e ./client --config-settings editable_mode=compat
Auth contract
All authenticated calls use Authorization: Bearer <token>.
Today the token is an API key from POST /auth/token (password login).
OIDC / passkeys are not implemented in this client; when the server adds them they will mint or refresh a Bearer token. Config reserves token_source (api_key now, oidc later). Publish/claim stay token-agnostic.
Config file: ~/.config/wasmmod-cdn/config.json
{
"url": "http://127.0.0.1:8000/cdn",
"token": "mcdn_…",
"email": "you@example.com",
"token_source": "api_key"
}
Usage
from pathlib import Path
from pymergetic.wasmmod.cdn_client import CdnClient, save_config
client = CdnClient("http://127.0.0.1:8000/cdn")
created = client.create_api_key_with_password("you@example.com", "secret", name="cli")
save_config({
"url": "http://127.0.0.1:8000/cdn",
"token": created["key"],
"email": "you@example.com",
})
authed = CdnClient.from_config()
authed.claim("hello")
authed.publish(
package="hello",
version="0.1.0",
files=[Path("hello.wasm")],
)
entry = authed.get_package("hello")
blob = authed.download_artifact("hello.wasm")
wasmmod
wasmmod owns pack → AOT → sign → zlib. This library is only the upload/download step:
pack → aot → sign → zlib → CdnClient.publish(...)
Metadata
Release files for pymergetic-wasmmod-cdn-client 0.2.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pymergetic_wasmmod_cdn_client-0.2.0a1.tar.gz | 2.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pymergetic_wasmmod_cdn_client-0.2.0a1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.7 kB
Release files / pymergetic_wasmmod_cdn_client-0.2.0a1.tar.gz
| Download URL | pymergetic_wasmmod_cdn_client-0.2.0a1.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4564b537c3c37653990023fbf88832f049ae1c000088759322fc9f29903eabb5
|
|
BLAKE2b-256 checksum How to use checksums |
9f2c41ec06e8b8c24fb28d8867f2c2b579bf6610058631b04c8a51816e502fdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pymergetic_wasmmod_cdn_client-0.2.0a1-py3-none-any.whl
| Download URL | pymergetic_wasmmod_cdn_client-0.2.0a1-py3-none-any.whl |
|---|---|
| Size | 38.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
39a83044eeb7863d09baeed992961d1d0d30c6733b2577cb61668a35f0941bde
|
|
BLAKE2b-256 checksum How to use checksums |
80db449b45c0bc5daaf427532e57e7391ad2a2927158d2e2d5be89ed824d751b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|