Data stream
Specific implementation of the StreamPipes API's data stream endpoints.
DataStreamEndpoint(parent_client)
¶
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
all()
¶
Get all resources of this endpoint provided by the StreamPipes API.
Results are provided as an instance of a ResourceContainer
that
allows to handle the returned resources in a comfortable and pythonic way.
RETURNS | DESCRIPTION |
---|---|
container
|
Container element that bundles the returned resources
TYPE:
|
build_url()
¶
Builds the endpoint's URL of the API path.
RETURNS | DESCRIPTION |
---|---|
url
|
The URL of the endpoint
TYPE:
|