httk.core.datastream.bytestream_filename_view

Classes

BytestreamFilenameView

A view presenting an underlying data streaming backend via a filename.

Module Contents

class httk.core.datastream.bytestream_filename_view.BytestreamFilenameView(obj, **hints)

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

A view presenting an underlying data streaming backend via a filename. This view is mostly useful for providing filenames to functions that will open them. Note: this view is not lazy (this is impossible for views inheriting str, since str is immutable).

Raises TypeError if created with a streaming data source that does not come with a name.

Parameters:
Raises:

TypeError – If the source has no filename.

unwrap()

Return the raw representation of the wrapped backend.

Returns:

The backend’s most raw available representation.

Return type:

Any

unview()

Return the presented filename as a plain string.

Returns:

The filename represented by this view.

Return type:

str