httk.core.datastream.bytestream_bytes_view

Classes

BytestreamBytesView

A view presenting underlying streaming byte data as bytes.

Module Contents

class httk.core.datastream.bytestream_bytes_view.BytestreamBytesView(obj, **hints)

Bases: httk.core.datastream.bytestream_view.BytestreamView, bytes

A view presenting underlying streaming byte data as bytes. This view can be used both to pass bytes in place of streaming data, and for reading streaming data into bytes. Note: this view is not lazy (this is impossible for views inheriting bytes, since bytes is immutable), hence all streaming data is read immediately upon creating this view.

Parameters:
unwrap()

Return the raw representation of the wrapped backend.

Returns:

The backend’s most raw available representation.

Return type:

Any

unview()

Return the presented data as plain bytes.

Returns:

A plain bytes value containing the presented data.

Return type:

bytes