Lake¶
Particula-beta Index / Particula Beta / Data / Lake
Auto-generated documentation for particula_beta.data.lake module.
Lake¶
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¶
Remove a stream by name. Example: del lake['stream_name']
Signature¶
def __delitem__(self, key: str) -> None: ...
Lake().dir¶
List available streams. Example: dir(lake)
Signature¶
def __dir__(self) -> list: ...
Lake().getattr¶
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¶
Get a stream by name. Example: lake['stream_name']
Signature¶
def __getitem__(self, key: str) -> Any: ...
Lake().iter¶
Iterate over the streams in the lake. Example: [stream.header for stream in lake]""
Signature¶
def __iter__(self) -> Iterator[Any]: ...
Lake().len¶
Return the number of streams in the lake. Example: len(lake)
Signature¶
def __len__(self) -> int: ...
Lake().repr¶
Return a string representation of the lake. Example: print(lake)
Signature¶
def __repr__(self) -> str: ...
Lake().setitem¶
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¶
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¶
Return an iterator over the key-value pairs.
Signature¶
def items(self) -> Iterator[Tuple[Any, Any]]: ...
Lake().keys¶
Return an iterator over the keys.
Signature¶
def keys(self) -> Iterator[Any]: ...
Lake().summary¶
Return a string summary iterating over each stream
and print Stream.header.
Example: lake.summary
Signature¶
@property
def summary(self) -> None: ...
Lake().values¶
Return an iterator over the values.
Signature¶
def values(self) -> Iterator[Any]: ...