Skip to main content

StreamHouse Python SDK

Python client for StreamHouse — S3-native event streaming.

Install

pip install streamhouse

Quick Start

from streamhouse import StreamHouse

sh = StreamHouse("http://localhost:8080", api_key="sk_...")

# Create a topic
sh.admin.create_topic("events", partitions=3)

# Produce
producer = sh.producer()
producer.send("events", key="user-1", value={"action": "click"})

# Consume
consumer = sh.consumer()
for record in consumer.stream("events", partition=0):
    print(f"{record.key_str}: {record.value_str}")

# Schema Registry
registry = sh.schema_registry()
schema_id = registry.register("events-value", '{"type": "object"}')

sh.close()

API

StreamHouse(url, api_key?, organization_id?, timeout?)

Main client. Provides:

  • sh.admin — topic, consumer group, agent, and metrics management
  • sh.producer() — send records
  • sh.consumer() — poll/stream records
  • sh.schema_registry() — register and retrieve schemas

Producer

producer = sh.producer()
result = producer.send("topic", value="hello", key="k1", partition=0)
# result.offset, result.partition

Consumer

consumer = sh.consumer()
records = consumer.poll("topic", partition=0, offset=0, max_records=100)
# or stream continuously:
for record in consumer.stream("topic", partition=0):
    process(record)

Admin

sh.admin.create_topic("name", partitions=3)
sh.admin.list_topics()
sh.admin.delete_topic("name")
sh.admin.list_consumer_groups()
sh.admin.get_consumer_lag("group-id")
sh.admin.list_agents()
sh.admin.get_metrics()

Schema Registry

registry = sh.schema_registry()
schema_id = registry.register("subject", schema_str, format=SchemaFormat.AVRO)
schema = registry.get_by_id(schema_id)
subjects = registry.list_subjects()

Metadata

Release files for streamhouse 0.1.0

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

Source distribution (sdist)

Source distribution for streamhouse 0.1.0
File Size Uploaded Provenance Actions
streamhouse-0.1.0.tar.gz 19.8 kB Without provenance Details for streamhouse-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for streamhouse 0.1.0
File Interpreter ABI Platform Actions
streamhouse-0.1.0-py3-none-any.whl Python 3 none any Details for streamhouse-0.1.0-py3-none-any.whl

Total release size: 42.5 kB

Release files / streamhouse-0.1.0.tar.gz

Download URL streamhouse-0.1.0.tar.gz
Size 19.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4faa43fd5b2a40f2b0d9eb66360fd2cb9af58db29cccf1125da82ef2a6b99ef4
BLAKE2b-256 checksum
How to use checksums
a629e46b14a6652f5d22beb55cb58d187f3d1870521115725e326a7f6b692dca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / streamhouse-0.1.0-py3-none-any.whl

Download URL streamhouse-0.1.0-py3-none-any.whl
Size 22.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c75c719bbb1c5ca3ca32422c769e40b5d138be27a02a387d7dbe6c7b40333679
BLAKE2b-256 checksum
How to use checksums
becd527022de7e909dc9e476999a34760735a57b8a838b03a1103c9124d97c23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for streamhouse 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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