lnbits-legend/lnbits/requestvars.py
2021-10-17 18:33:29 +01:00

11 lines
198 B
Python

import contextvars
import types
request_global = contextvars.ContextVar(
"request_global", default=types.SimpleNamespace()
)
def g() -> types.SimpleNamespace:
return request_global.get()