earthkit.data.sources.stream

Attributes

Classes

MultiStreamSource

Base class for all sources.

Stream

StreamMemorySource

Base class for all sources.

StreamSource

Base class for all sources.

Functions

Module Contents

class earthkit.data.sources.stream.MultiStreamSource(sources, **kwargs)

Bases: earthkit.data.sources.Source

Base class for all sources.

batched(n)
graph(depth=0)
group_by(*args)
ignore()

Indicates to ignore this source in concatenation/merging.

Return type:

bool

classmethod merge(sources)
mutate()
mutate_source()
name = None
property parent

The parent source, if any.

source_filename = None
sources
to_data_object()

Convert this source into a data object, if possible.

to_xarray(**kwargs)
class earthkit.data.sources.stream.Stream(stream=None, maker=None, **kwargs)
ignore()
kwargs
maker = None
mutate()
property stream
class earthkit.data.sources.stream.StreamMemorySource(stream, **kwargs)

Bases: earthkit.data.sources.memory.MemoryBaseSource

Base class for all sources.

batched(*args)
bounding_box()
datetime(**kwargs)
describe(*args, **kwargs)
graph(depth=0)
group_by(*args)
ignore()

Indicates to ignore this source in concatenation/merging.

Return type:

bool

ls(*args, **kwargs)
metadata(*args, **kwargs)
mutate()
mutate_source()
name = None
order_by(*args, **kwargs)
property parent

The parent source, if any.

scaled(*args, **kwargs)
sel(*args, **kwargs)
source_filename = None
statistics(**kwargs)
to_data_object()

Convert this source into a data object, if possible.

to_fieldlist(*args, **kwargs)
to_numpy(**kwargs)
to_pandas(**kwargs)
to_target(*args, **kwargs)
to_xarray(**kwargs)
property values
class earthkit.data.sources.stream.StreamSource(stream, **kwargs)

Bases: earthkit.data.sources.Source

Base class for all sources.

batched(n)

Iterate through the stream in batches of n.

Parameters:

n (int) – Batch size.

Returns:

Returns an iterator yielding batches of n elements. Each batch is a new object containing a view to the data in the original object, so no data is copied. The last batch may contain fewer than n elements.

Return type:

object

graph(depth=0)
group_by(*keys, **kwargs)

Iterate through the stream in groups defined by metadata keys.

Parameters:

*keys (tuple) – Positional arguments specifying the metadata keys to group by. Keys can be a single or multiple str, or a list or tuple of str.

Returns:

Returns an iterator yielding batches of elements grouped by the metadata keys. Each batch is a new object containing a view to the data in the original object, so no data is copied. It generates a new group every time the value of the keys change.

Return type:

object

ignore()

Indicates to ignore this source in concatenation/merging.

Return type:

bool

mutate()
mutate_source()
name = None
property parent

The parent source, if any.

source_filename = None
to_data_object()

Convert this source into a data object, if possible.

earthkit.data.sources.stream.make_stream_source_from_other(source, **kwargs)
earthkit.data.sources.stream.parse_stream_kwargs(**kwargs)
earthkit.data.sources.stream.source