I have a decorator which adds a user onto the flask global context g:
class User: def __init__(self, user_data) -&
You could proxy the g object. Consider the following implementation:
g
import flask class User: ... class _g: user: User # Add type hints for other attributes # ... def __getattr__(self, key): return getattr(flask.g, key) g = _g()