docs: getitem documentation

Signed-off-by: Alexander Tkachev <sasha64sasha@gmail.com>
This commit is contained in:
Alexander Tkachev 2022-07-24 21:50:22 +03:00
parent 3845aa7295
commit fb4f993536
1 changed files with 6 additions and 2 deletions

View File

@ -58,9 +58,13 @@ class CloudEvent(abc.ABC):
)
return False
# Data access is handled via `.data` member
# Attribute access is managed via Mapping type
def __getitem__(self, key: str) -> typing.Any:
"""
Data access is handled via `.data` member
Attribute access is managed via Mapping type
:param key: The event attribute name.
:return: The event attribute value.
"""
return self._attributes_read_model[key]
def get(