context
messageflux.utils.context
Context
a stack like context object. allows to store some key-value data and access it
get
abstractmethod
gets the current value for 'key' in the context. returns default if key does not exist
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key |
str
|
the key to get |
required |
default |
the default value to return if key does not exist |
None
|
Returns:
| Type | Description |
|---|---|
Any
|
the current value for 'key' in the context. returns 'default' if key does not exist |