Skip to main content

band-sdk-core

Shared Band event-payload validation, memory-taxonomy, and inbound-delivery runtime state, compiled from Rust into a native Python extension (import band_sdk_core). Every function is synchronous, pure computation — no network, filesystem, or logging.

band-sdk-core-core (Rust)  -->  band-sdk-core (this package, PyPI)  -->  band-sdk-python

If you're using band-sdk-python, it already depends on this package — you don't need to install it yourself. Install it directly only if you're calling into it without that SDK. Full picture: repository architecture.

Install

pip install band-sdk-core

Wheels are prebuilt (abi3, Python >= 3.11) for Linux (manylinux/musllinux, x86_64/aarch64), macOS (arm64/x86_64), and Windows (amd64/arm64) — no Rust toolchain needed to install.

Quickstart

import band_sdk_core

try:
    payload = band_sdk_core.validate_event_payload("room_deleted", {"id": "room-1"})
except ValueError as e:
    for path, code, message in e.issues:
        print(f"{path}: {code} - {message}")

validate_event_payload is the platform's inbound WebSocket payload policy: normalize a well-formed payload, or reject a malformed one with every violation reported at once, never just the first.

Public surface

validate_event_payload(event_type, raw, trace_context=None)

event_type is a platform name ("message_created", "agent.control", …) or an EventType. raw is a JSON-shaped Python value. Success returns the normalized payload (event_created returns the input unchanged). Failure raises ValueError with .args == (message,) (str(e) is ordinary), .issues (a tuple of (path, code, message)), and .trace_context. There is no custom exception class.

EventType

The closed set of inbound event names.

Delivery-state runtime classes

ClaimRegistry, RetryTracker, ParticipantRoster are the inbound-delivery runtime state classes — lifecycle and design decisions: runtime-state-policy.md.

A participant is any mapping; add/set_all read id, name, type, handle, description from it and list() returns dicts with exactly those five keys. id is required and must be a string; the other four are each a string or None. A non-mapping value, a missing/non-string id, or another field that is not a string or None raises TypeError. set_all takes an optional trace_context and raises ValueError — leaving the roster unchanged, with .issues and .trace_context attached like validate_event_payload's error — if its snapshot names the same id twice. RetryTracker's max_tracked must be at least 1; 0 raises ValueError. ClaimRegistry's max_completed must be at least 1 too — 0 also raises ValueError.

Memory taxonomy

MemorySystem, MemoryType, MemorySegment, MemoryStoreScope, MemoryListScope, MemoryStatus are the canonical memory taxonomy — design decisions: memory-taxonomy-policy.md. Each is a closed set with a wire_name property and a from_wire_name static method (None for an unrecognized string), mirroring EventType.

validate_memory_type_for_system(system, memory_type, trace_context=None)

system/memory_type are each a wire-name string or the matching MemorySystem/MemoryType instance (mirroring validate_event_payload's acceptance of either an event name or an EventType), and it returns None on success. Failure raises ValueError with the same .issues/.trace_context contract as validate_event_payload — an unrecognized system and an unrecognized memory_type are independent issues, both reported when both strings are invalid.

Values across the language boundary

JSON objects become Python dicts. JSON null becomes None. An explicit null stays distinct from an absent key — a distinction the payload validator uses. Values that cannot be converted raise TypeError, which except Exception catches.

Build / test

just check type-checks and lints this crate. Linking the extension happens through uv / maturin (just test-py, just build-py), not cargo test.

just test-py     # uv sync, pytest, isolated wheel install
just build-py    # uv build (wheel only)

Wheels are platform-specific. Recipes use uv and honor UV_PYTHON, or PYTHON / PYTHON_BIN. Windows builds need the MSVC toolchain rustup's default host target uses.

The wheel is abi3 for Python >= 3.11. Typed stubs are band_sdk_core.pyi plus an empty py.typed. just test-py checks they match the runtime package and that they ship in the wheel.

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

band_sdk_core-0.4.1-cp311-abi3-win_arm64.whl (242.6 kB view details)

Uploaded CPython 3.11+Windows ARM64

band_sdk_core-0.4.1-cp311-abi3-win_amd64.whl (252.6 kB view details)

Uploaded CPython 3.11+Windows x86-64

band_sdk_core-0.4.1-cp311-abi3-musllinux_1_2_x86_64.whl (624.4 kB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ x86-64

band_sdk_core-0.4.1-cp311-abi3-musllinux_1_2_aarch64.whl (589.7 kB view details)

Uploaded CPython 3.11+musllinux: musl 1.2+ ARM64

band_sdk_core-0.4.1-cp311-abi3-manylinux_2_28_x86_64.whl (419.1 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ x86-64

band_sdk_core-0.4.1-cp311-abi3-manylinux_2_28_aarch64.whl (412.4 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

band_sdk_core-0.4.1-cp311-abi3-macosx_11_0_arm64.whl (370.7 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

band_sdk_core-0.4.1-cp311-abi3-macosx_10_12_x86_64.whl (371.9 kB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file band_sdk_core-0.4.1-cp311-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for band_sdk_core-0.4.1-cp311-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 3d49bd4806b1f8ed0b007c28b7e0fb3d22ab50c3fcc8e3efd1a9bc861ed70cf3
MD5 6b80f82158c3e5caa535e16e350070f9
BLAKE2b-256 760c9d377790beee18f8dae073494e7f6430cf52134dae2f7173e055cf1a9729

See more details on using hashes here.

Provenance

The following attestation bundles were made for band_sdk_core-0.4.1-cp311-abi3-win_arm64.whl:

Publisher: publish.yml on band-ai/band-sdk-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file band_sdk_core-0.4.1-cp311-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for band_sdk_core-0.4.1-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6b3503d6b28dea2150d87f750944e82eda56aa6dd18477eaed7b9db3372c965b
MD5 416cbdf069695ca359c60c8891c5a96c
BLAKE2b-256 c11e77fd31bad34364fe23649d0fcf1a7c714ce9b1c9c3d1658fcea949c1e915

See more details on using hashes here.

Provenance

The following attestation bundles were made for band_sdk_core-0.4.1-cp311-abi3-win_amd64.whl:

Publisher: publish.yml on band-ai/band-sdk-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file band_sdk_core-0.4.1-cp311-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for band_sdk_core-0.4.1-cp311-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 dd29f1f4c233f3ac75b4c7be5d5d1cb867b093f9ed0bb21d148ef0d128ec0022
MD5 bf4bbcbc5ade4e6191cff1e802f983bf
BLAKE2b-256 1c85123f3c27deeec773ce534cda6912a60e4b442ba9dcdfa4ca701e0feb94ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for band_sdk_core-0.4.1-cp311-abi3-musllinux_1_2_x86_64.whl:

Publisher: publish.yml on band-ai/band-sdk-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file band_sdk_core-0.4.1-cp311-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for band_sdk_core-0.4.1-cp311-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 01a869c4dbbe7b9aecbcdaf73b5d7a31799934fcd33a7073e813dd48a86c059a
MD5 ba370f167f306aa6fd2bb8483b747ee1
BLAKE2b-256 744f4a815bb47c0d578b602fccbecc99c27f4bd9c0e7a6f1232cc4ba8893b367

See more details on using hashes here.

Provenance

The following attestation bundles were made for band_sdk_core-0.4.1-cp311-abi3-musllinux_1_2_aarch64.whl:

Publisher: publish.yml on band-ai/band-sdk-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file band_sdk_core-0.4.1-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for band_sdk_core-0.4.1-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 05f67892830872a7649f25f8078ac7d00309d73d99171cc90f16b66689cf495f
MD5 1fd1229a906d57031f289c66a73aad9b
BLAKE2b-256 2f979999e31bbcdc52307ca98ca973a8ec9bf93e4d2eccd2082407d8a873e806

See more details on using hashes here.

Provenance

The following attestation bundles were made for band_sdk_core-0.4.1-cp311-abi3-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on band-ai/band-sdk-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file band_sdk_core-0.4.1-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for band_sdk_core-0.4.1-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ca14ad788582cb8fa1d8854db6f3e694ebc3947e4cb66e9dbcdc004cada567a6
MD5 a6d5421597b9a8dfa7487674e2326bf7
BLAKE2b-256 1e1034115dc70bb081330d47dee31f9590fcd5c1428afd611004f601f249993b

See more details on using hashes here.

Provenance

The following attestation bundles were made for band_sdk_core-0.4.1-cp311-abi3-manylinux_2_28_aarch64.whl:

Publisher: publish.yml on band-ai/band-sdk-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file band_sdk_core-0.4.1-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for band_sdk_core-0.4.1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2baad6db0f0434342aebc8b9108e869aff4bb6032d13af6b9015c8a24b9e42b9
MD5 da381674c2e22948248a1851d489c214
BLAKE2b-256 c0d5e1fec5eb9ad0229a9eb07a506bff10be29d981cb6edef6db52ea9a570384

See more details on using hashes here.

Provenance

The following attestation bundles were made for band_sdk_core-0.4.1-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: publish.yml on band-ai/band-sdk-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file band_sdk_core-0.4.1-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for band_sdk_core-0.4.1-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 eaaa49822dea559a29aa5d3b3beaedc70c661a8a69a8f97f4024bac7d9e6ab3f
MD5 0c96f5e334f47418e0bea80e891b5e31
BLAKE2b-256 581e64fe2dc9cd64936978661ef3af51f50f1188a7104e4f30f99ccbe1dcdfb7

See more details on using hashes here.

Provenance

The following attestation bundles were made for band_sdk_core-0.4.1-cp311-abi3-macosx_10_12_x86_64.whl:

Publisher: publish.yml on band-ai/band-sdk-core

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

2.4.0

8 files

2.3.0

8 files

2.2.0

8 files

2.1.0

8 files

2.0.0

8 files

1.2.1

8 files

1.2.0

8 files

1.1.0

8 files

1.0.1

8 files

1.0.0

8 files

0.8.0

8 files

0.7.2

8 files

0.7.1

8 files

0.7.0

8 files

0.6.0

8 files

0.5.0

8 files

This release

0.4.1 This release

8 files

0.4.0

8 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page