Skip to main content

Streamdal Python SDK

Release Pull Request Discord

Python SDK for Streamdal.

For more details, see the main streamdal repo.


Documentation

See https://docs.streamdal.com

Installation

python -m pip install streamdal

Requirements

Example Usage

import json
from streamdal import (OPERATION_TYPE_CONSUMER, ProcessRequest, StreamdalClient, StreamdalConfig, EXEC_STATUS_TRUE)

client = StreamdalClient(
    cfg=StreamdalConfig(
        service_name="order-ingest",
        streamdal_url="streamdal-server.svc.cluster.local:8082",
        streamdal_token="1234",
    )
)

res = client.process(
    ProcessRequest(
        operation_type=OPERATION_TYPE_CONSUMER,
        operation_name="new-order-topic",
        component_name="kafka",
        data=b'{"object": {"email": "user@streamdal.com"}}',
    )
)

# Check that process() completed successfully
if res.status == EXEC_STATUS_TRUE:
    print("Success processed payload")
    data = json.loads(res.data)
    print("Response:", json.dumps(data, indent=2))
else:
    print("Failed to process payload")
    print("Error:", res.status_message)

Metrics

Metrics are published to Streamdal server and are available in Prometheus format at http://streamdal_server_url:8081/metrics

Metric Description Labels
streamdal_counter_consume_bytes Number of bytes consumed by the client service, component_name, operation_name, pipeline_id, pipeline_name
streamdal_counter_consume_errors Number of errors encountered while consuming payloads service, component_name, operation_name, pipeline_id, pipeline_name
streamdal_counter_consume_processed Number of payloads processed by the client service, component_name, operation_name, pipeline_id, pipeline_name
streamdal_counter_produce_bytes Number of bytes produced by the client service, component_name, operation_name, pipeline_id, pipeline_name
streamdal_counter_produce_errors Number of errors encountered while producing payloads service, component_name, operation_name, pipeline_id, pipeline_name
streamdal_counter_produce_processed Number of payloads processed by the client service, component_name, operation_name, pipeline_id, pipeline_name
streamdal_counter_notify Number of notifications sent to the server service, component_name, operation_name, pipeline_id, pipeline_name

Release

Any push or merge to the main branch with any changes in /sdks/python/* will automatically tag and release a new console version with sdks/python/vX.Y.Z.

(1) If you'd like to skip running the release action on push/merge to main, include norelease anywhere in the commit message.

Metadata

Release files for streamdal 0.1.18

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

Source distribution (sdist)

Source distribution for streamdal 0.1.18
File Size Uploaded
streamdal-0.1.18.tar.gz 24.7 kB Details

Release files / streamdal-0.1.18.tar.gz

Download URL streamdal-0.1.18.tar.gz
Size 24.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b61271113450bae0153a0a74e3f56fe7a2dc585d844d7889f50b0be34d0edbfa
BLAKE2b-256 checksum
How to use checksums
d9dd328c5e2b29f0f2fa87144437f569377c8562c0f56e5b5ce5c765a9b468ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.1.18 This release

1 release file

0.1.17

1 release file

0.1.16

1 release file

0.1.15

1 release file

0.1.14

1 release file

0.1.13

1 release file

0.1.12

1 release file

0.1.11

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.0.47

1 release file

0.0.46

1 release file

0.0.45

1 release file

0.0.44

1 release file

0.0.43

1 release file

0.0.41

1 release file

0.0.39

1 release file

0.0.37

1 release file

0.0.35

1 release file

0.0.33

1 release file

0.0.32

1 release file

0.0.31

1 release file

0.0.30

1 release file

0.0.29

1 release file

0.0.28

1 release file

0.0.27

1 release file

0.0.26

1 release file

0.0.25

1 release file

0.0.24

1 release file

0.0.23

1 release file

0.0.22

1 release file

0.0.1

1 release file

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