Skip to content

Lake

Particula-beta Index / Particula Beta / Data / Lake

Auto-generated documentation for particula_beta.data.lake module.

Lake

Show source in lake.py:10

A class representing a lake which is a collection of streams.

Attributes

streams (Dict[str, Stream]): A dictionary to hold streams with their names as keys.

Signature

class Lake: ...

Lake().delitem

Show source in lake.py:97

Remove a stream by name. Example: del lake['stream_name'].

Signature

def __delitem__(self, key: str) -> None: ...

Lake().dir

Show source in lake.py:52

List available streams. Example: dir(lake).

Signature

def __dir__(self) -> list: ...

Lake().getattr

Show source in lake.py:40

Allow accessing streams as an attributes.

Raises

- `AttributeError` - If the stream name is not in the lake.
  • Example - lake.stream_name

Signature

def __getattr__(self, name: str) -> Any: ...

Lake().getitem

Show source in lake.py:82

Get a stream by name. Example: lake['stream_name'].

Signature

def __getitem__(self, key: str) -> Any: ...

Lake().iter

Show source in lake.py:58

Iterate over the streams in the lake. Example: [stream.header for stream in lake]"".

Signature

def __iter__(self) -> Iterator[Any]: ...

Lake().len

Show source in lake.py:76

Return the number of streams in the lake. Example: len(lake).

Signature

def __len__(self) -> int: ...

Lake().repr

Show source in lake.py:106

Return a string representation of the lake. Example: print(lake).

Signature

def __repr__(self) -> str: ...

Lake().setitem

Show source in lake.py:88

Set a stream by name. Example: lake['stream_name'] = new_stream.

Signature

def __setitem__(self, key: str, value: Stream) -> None: ...

See also

Lake().add_stream

Show source in lake.py:20

Add a stream to the lake.

Arguments

  • stream Stream - The stream object to be added.
  • name str - The name of the stream.

Raises


- `ValueError` - If the stream name is already in use or not a valid
identifier.

Signature

def add_stream(self, stream: Stream, name: str) -> None: ...

See also

Lake().items

Show source in lake.py:64

Return an iterator over the key-value pairs.

Signature

def items(self) -> Iterator[Tuple[Any, Any]]: ...

Lake().keys

Show source in lake.py:72

Return an iterator over the keys.

Signature

def keys(self) -> Iterator[Any]: ...

Lake().summary

Show source in lake.py:112

Return a string summary iterating over each stream
and print Stream.header.

Example: lake.summary.

Signature

@property
def summary(self) -> None: ...

Lake().values

Show source in lake.py:68

Return an iterator over the values.

Signature

def values(self) -> Iterator[Any]: ...