Skip to main content

Python client SDK for kapsl-runtime with IPC, shared-memory, and hybrid inference transports

Project description

kapsl-sdk

Python client SDK for kapsl-runtime — the Rust-native AI model inference engine.

Supports socket, TCP, shared-memory, and hybrid transports with a simple Python API.

Install

pip install kapsl-sdk

Pre-compiled abi3 wheels are available for Linux, macOS, and Windows on Python 3.9+.

Quick start

from kapsl_sdk import KapslClient

client = KapslClient()  # connects to /tmp/kapsl.sock by default

# Streaming LLM inference
prompt = "<|im_start|>user\nHello<|im_end|>\n<|im_start|>assistant\n"

for chunk in client.infer_stream(model_id=0, shape=[1, 1], dtype="string", data=prompt.encode()):
    print(chunk.decode("utf-8"), end="", flush=True)
import numpy as np

# Standard tensor inference
data = np.array([[1.0, 2.0, 3.0, 4.0]], dtype=np.float32)
result = client.infer(model_id=0, shape=[1, 4], dtype="float32", data=data.tobytes())
output = np.frombuffer(result, dtype=np.float32)

Transports

Client Transport Use case
KapslClient Unix socket / TCP Default — local or remote
KapslShmClient Shared memory Lowest latency, co-located only
KapslHybridClient Socket control + SHM data Production throughput
from kapsl_sdk import KapslClient, KapslShmClient, KapslHybridClient

# TCP
client = KapslClient("tcp://192.168.1.10:9096")

# Shared memory (same machine only)
client = KapslShmClient()

# Hybrid
client = KapslHybridClient()

Authentication

client = KapslClient(api_token="your-token")

Docs

Requirements

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

kapsl_sdk-0.1.23.tar.gz (315.8 kB view details)

Uploaded Source

Built Distributions

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

kapsl_sdk-0.1.23-cp39-abi3-win_amd64.whl (594.6 kB view details)

Uploaded CPython 3.9+Windows x86-64

kapsl_sdk-0.1.23-cp39-abi3-manylinux_2_34_x86_64.whl (875.8 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.34+ x86-64

kapsl_sdk-0.1.23-cp39-abi3-macosx_11_0_arm64.whl (716.5 kB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

File details

Details for the file kapsl_sdk-0.1.23.tar.gz.

File metadata

  • Download URL: kapsl_sdk-0.1.23.tar.gz
  • Upload date:
  • Size: 315.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kapsl_sdk-0.1.23.tar.gz
Algorithm Hash digest
SHA256 26c09203919f6acf4b6389f039da558f33fc1da3c3885fa691996166dd7dd324
MD5 0964b6507ea6dd774c17106c483be109
BLAKE2b-256 724f40e3836e94357b826da6e5513796583b3551893fd43f700440b3d0a1d58a

See more details on using hashes here.

Provenance

The following attestation bundles were made for kapsl_sdk-0.1.23.tar.gz:

Publisher: publish-python-package.yml on kapsl-runtime/kapsl-sdk

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

File details

Details for the file kapsl_sdk-0.1.23-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: kapsl_sdk-0.1.23-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 594.6 kB
  • Tags: CPython 3.9+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kapsl_sdk-0.1.23-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c6d60b9d3cf05ef111bae77a4b53fd990601602db0e7f06bed8f35bf22428c67
MD5 c9f007a8396b8d7c451f935699cdd692
BLAKE2b-256 df4e8fb99a170921508095e325064be3fa2a02dab356fe39189f289e8a6e1c40

See more details on using hashes here.

Provenance

The following attestation bundles were made for kapsl_sdk-0.1.23-cp39-abi3-win_amd64.whl:

Publisher: publish-python-package.yml on kapsl-runtime/kapsl-sdk

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

File details

Details for the file kapsl_sdk-0.1.23-cp39-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for kapsl_sdk-0.1.23-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c6c2c56f055f2882dd401510eeec5b0aeceec12478b416b34634a5c3d8a79815
MD5 5052a035a3360c958d7cf7f00f89c955
BLAKE2b-256 65686d0836f7d51c0b99edd099cba4a0a309e6ffe1d2dcd59214d23097e2b442

See more details on using hashes here.

Provenance

The following attestation bundles were made for kapsl_sdk-0.1.23-cp39-abi3-manylinux_2_34_x86_64.whl:

Publisher: publish-python-package.yml on kapsl-runtime/kapsl-sdk

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

File details

Details for the file kapsl_sdk-0.1.23-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for kapsl_sdk-0.1.23-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f36302f281afffab2052decffd36090690ade6583efa8968d7d217ffd7c0d32
MD5 28e5f7c1b5db1c41c6f2774f8744fd20
BLAKE2b-256 adc2ec7dcbfafe51e78652f8abfc11b92e90c944182d9caaf5aa1bf80e6d1ae5

See more details on using hashes here.

Provenance

The following attestation bundles were made for kapsl_sdk-0.1.23-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: publish-python-package.yml on kapsl-runtime/kapsl-sdk

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

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page