Skip to content

Experimental

The experimental module contains features that we want to test and iterate on internally and with our customers. While we will keep the rest of the pingthings api following semantic versioning as much as possible, this may not be the case with our experimental features.

Experimental Features Ahead!

Experimential features are enhancements and explorations we want to get to our customers in a quick manner for feedback as well as for internal iteration. These are potentially unstable features, which are not guaranteed to follow the same release and update cycle as the other portions of the api. Please give these a try and give us feedback as they may be incorporated into the api in the future!

Currently Available Features

pingthings.experimental.dask

FUNCTION DESCRIPTION
dataframe_from_stream_values

Create a dask dataframe from raw values from a stream, distributed using dask.

Attributes

Functions

dataframe_from_stream_values

dataframe_from_stream_values(
    s: Stream,
    start: Optional[int] = None,
    end: Optional[int] = None,
    partitions: Optional[int] = None,
) -> DataFrame

Create a dask dataframe from raw values from a stream, distributed using dask.

Experimental Feature

This feature is an experimental feature for users to test and provide feedback on. Experimental features will not follow standard semantic versioning practices and may be removed or changed during minor version releases. Please refer to the changelogs and function documentation for more information.

PARAMETER DESCRIPTION
s

The stream to read from.

TYPE: Stream

start

The start time of the stream read query, if not provided, the earliest point in the stream is used.

TYPE: Optional[int] DEFAULT: None

end

The end time of the stream read query, if not provided, the latest point in the stream is used.

TYPE: Optional[int] DEFAULT: None

partitions

How many chunks should this read query be split across in time. If not provided, a default value will be computed \(\frac{total\_points}{10\_000\_000}\)

TYPE: Optional[int] DEFAULT: None

RETURNS DESCRIPTION
DataFrame

A dask dataframe read from the stream.

pingthings.experimental.flags.pdc

Experimental utilities for working with pdc data streams

FUNCTION DESCRIPTION
decode_opdc_stat

Return the decoded meaning of the provided stat flag.

Functions

decode_opdc_stat

decode_opdc_stat(stat: int) -> str

Return the decoded meaning of the provided stat flag.

OpenPDC and C37.118 Standard Assumed

This is using the definition of the status words from the OpenPDC, and assuming that the lower bit values originate from a c37.118 dataframe. Relevant link here.

PARAMETER DESCRIPTION
stat

The status flag to decode.

TYPE: int

RETURNS DESCRIPTION
str

The decoded status message.