Project.get#
- Project.get(key, *, version=-1, metadata=False)[source]#
Get the value associated to
key
from the Project.- Parameters:
- keystr
The key corresponding to the item to get.
- versionUnion[Literal[-1, “all”], int], default=-1
If -1, get the latest value associated to
key
. If “all”, get all the values associated tokey
. If instance of int, get the nth value associated tokey
.- metadatabool, default=False
If True, get the metadata in addition to the value.
- Returns:
- valueany
Value associated to
key
, when latest=True and metadata=False.- value_and_metadatadict
Value associated to
key
with its metadata, when latest=True and metadata=True.- list_of_valueslist[any]
Values associated to
key
, ordered by date, when latest=False.- list_of_values_and_metadatalist[dict]
Values associated to
key
with their metadata, ordered by date, when latest=False and metadata=False.
- Raises:
- KeyError
If the key is not in the project.