Skip to main content

jetpack-sdk

Lightweight, zero-dependency Python Worker SDK for JetPack local IPC, zero-copy binary framing, and sandboxed GPU worker orchestration.

Installation

pip install jetpack-sdk

Or using uv:

uv add jetpack-sdk

For faster Cython-accelerated MsgPack header encoding/decoding, install the optional msgpack extra (otherwise jetpack-sdk uses its built-in pure-Python MsgPack codec with zero external runtime dependencies):

pip install "jetpack-sdk[msgpack]"

Note: When running inside a worker managed by jetpack-daemon, jetpack-sdk is also embedded offline inside the daemon and provisioned into .venv automatically if requirements = ["jetpack-sdk"] is declared in app.toml.

Quick Start

from jetpack_sdk import JetPackClient

with JetPackClient() as client:
    while True:
        frame = client.read_frame()
        if frame is None:
            break  # Daemon closed IPC channel

        if frame.opcode == "worker.ping":
            client.send_frame(
                opcode="worker.pong",
                payload=frame.payload or b"pong",
                channel_id=frame.channel_id,
                correlation_id=frame.correlation_id,
            )

Typed Opcode Contracts (@opcode)

Decorate handlers with @opcode and generate strict TypeScript JetPackOpcodeMap definitions via jetpack codegen:

from pydantic import BaseModel
from jetpack_sdk import JetPackClient, opcode

class ResizeMeta(BaseModel):
    width: int
    height: int

@opcode("image.resize", request=ResizeMeta, response=dict, binary=True)
def handle_resize(client: JetPackClient, frame) -> None:
    mv = memoryview(frame.payload)
    # Process binary bytes zero-copy...
    client.send_frame(
        opcode="image.resize.ok",
        payload=bytes(mv),
        channel_id=frame.channel_id,
        correlation_id=frame.correlation_id,
    )

Documentation

Metadata

Release files for jetpack-sdk 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jetpack-sdk 0.1.1
File Size Uploaded Provenance Actions
jetpack_sdk-0.1.1.tar.gz 11.8 kB Without provenance Details for jetpack_sdk-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jetpack-sdk 0.1.1
File Interpreter ABI Platform Actions
jetpack_sdk-0.1.1-py3-none-any.whl Python 3 none any Details for jetpack_sdk-0.1.1-py3-none-any.whl

Total release size: 23.3 kB

Release files / jetpack_sdk-0.1.1.tar.gz

Download URL jetpack_sdk-0.1.1.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0e481d9e9f8c7ffb19bfda2fca92da14f0535fb34c3a7e33f4684d9bfa048bdd
BLAKE2b-256 checksum
How to use checksums
65396d797b3da74842c61bb95e3f0ee2dc14e9d035f8a09f6dd3ecdbb90e3c7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.16

Release files / jetpack_sdk-0.1.1-py3-none-any.whl

Download URL jetpack_sdk-0.1.1-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8028c69861ec557bda5e09063f187e60a1817beb3822e9f7aa26cd65d07e5636
BLAKE2b-256 checksum
How to use checksums
548f7ec755475b60675713ecb2b177a96804880e51a1bd92631d2b22e4d463b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.16

Security for jetpack-sdk 0.1.1

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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