Service Context¶
service_context
¶
Immutable context carried through every application-service call.
ServiceContext
dataclass
¶
Immutable context carried through every application-service call.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
correlation_id
|
UUID
|
A unique identifier that traces the entire |
uuid4()
|
user_id
|
str | None
|
The identifier of the authenticated user, if any. |
None
|
permissions
|
list[str]
|
The permissions held by the current user. |
list[str]()
|
metadata
|
dict[str, Any]
|
Arbitrary key-value pairs for cross-cutting concerns |
dict[str, Any]()
|