Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ds-event-stream-py-sdk

A Python package from the DS Event Stream Python SDK.

Installation

Install the package using pip:

pip install ds-event-stream-py-sdk

Or using uv (recommended):

uv pip install ds-event-stream-py-sdk

Quick Start

from ds_event_stream_py_sdk import __version__

print(f"ds-event-stream-py-sdk version: {__version__}")

Features

  • Kafka producer
  • Kafka consumer
  • Event stream model

Usage

import logging
from uuid import uuid4

from ds_common_logger_py_lib import Logger
from ds_event_stream_py_sdk.errors import ProducerError
from ds_event_stream_py_sdk.models.v1 import EventStream
from ds_event_stream_py_sdk.producer import KafkaProducer

Logger.configure(level=logging.DEBUG)
logger = Logger.get_logger(__name__)


producer = KafkaProducer(
    bootstrap_servers="b0.dev.kafka.ds.local:9095",
    sasl_username="ds.test.producer.v1",
    sasl_password="",
    timeout=5.0,
)

event = EventStream(
    session_id=uuid4(),
    tenant_id=uuid4(),
    event_type="example.event",
    event_source="examples",
    created_by="John Doe",
    payload={"hello": "world"},
)
producer.send_message(
    topic="ds.test.message.created.v1",
    message=event,
    key=str(event.session_id),
    timeout=5.0,
)

Requirements

  • Python 3.10 or higher
  • ds-common-logger-py-lib
  • ds-common-serde-py-lib
  • confluent-kafka

Documentation

Full documentation is available at:

Development

To contribute or set up a development environment:

# Clone the repository
git clone https://github.com/grasp-labs/ds-event-stream-py-sdk.git
cd ds-event-stream-py-sdk

# Install development dependencies
uv sync --all-extras --dev

# Run tests
make test

See the README for more information.

License

This package is licensed under the Apache License 2.0. See the LICENSE-APACHE file for details.

Support

Metadata

Release files for ds-event-stream-py-sdk 0.1.0a1

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

Source distribution (sdist)

Source distribution for ds-event-stream-py-sdk 0.1.0a1
File Size Uploaded
ds_event_stream_py_sdk-0.1.0a1.tar.gz 15.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ds-event-stream-py-sdk 0.1.0a1
File Interpreter ABI Platform
ds_event_stream_py_sdk-0.1.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 31.0 kB

Release files / ds_event_stream_py_sdk-0.1.0a1.tar.gz

Download URL ds_event_stream_py_sdk-0.1.0a1.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
793db912561e680cfe1aeb13c259fda7d0d0bde659287f929f422e238c4fc85b
BLAKE2b-256 checksum
How to use checksums
89bd0d0cad235661a9dbc80fee2fbbe0be9fa49397c512ac46023badc1dc603e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / ds_event_stream_py_sdk-0.1.0a1-py3-none-any.whl

Download URL ds_event_stream_py_sdk-0.1.0a1-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed656612cbac323cf483f0d805e189c40a3a6c5230676920868ddcabbf9d77db
BLAKE2b-256 checksum
How to use checksums
4338f657c3f851f94c786399ed2fd617e3351628d6a054293c06bd69d6657eca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.0a1 This release

2 release 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