Skip to content

Data stream

Specific implementation of the StreamPipes API's data stream endpoints.

DataStreamEndpoint

Bases: APIEndpoint

Implementation of the DataStream endpoint.

Consequently, it allows querying metadata about available data streams (see all() method). The metadata is returned as an instance of DataStreams.

Examples:

from streampipes.client import StreamPipesClient
from streampipes.client.config import StreamPipesClientConfig
from streampipes.client.credential_provider import StreamPipesApiKeyCredentials

client_config = StreamPipesClientConfig(
    credential_provider=StreamPipesApiKeyCredentials(username="test-user", api_key="api-key"),
    host_address="localhost",
    port=8082,
    https_disabled=True
)
client = StreamPipesClient.create(client_config=client_config)

# let's get all existing data streams in StreamPipes
data_streams = client.dataStreamApi.all()
len(data_streams)
2