Skip to main content

GrpcAttributeMap

GrpcAttributeMap Objects​

class GrpcAttributeMap(GrpcAttributeMapProtocol)

The value of each protocol attribute, keyed by attribute name.

from_entries​

@classmethod
def from_entries(
cls, entries: typing.List[GrpcAttributeMapEntry]) -> GrpcAttributeMap

Collect entries into a map. A key repeated across entries keeps the value of the last one.

contains_key​

def contains_key(key: str) -> bool

Whether a value is stored under key.

entries​

def entries() -> typing.List[GrpcAttributeMapEntry]

Every entry, in key order.

get​

def get(key: str) -> typing.Optional[str]

The value stored under key, or None if there is none.

is_empty​

def is_empty() -> bool

Whether the map holds no entries.

keys​

def keys() -> typing.List[str]

Every key, in key order.

len​

def len() -> int

The number of entries.

values​

def values() -> typing.List[str]

Every value, ordered by the key it is stored under.