Files
plantillas-proyectos/backend/core/context.py
Kevin_Ramirez bdd089954b
Some checks failed
Build Producción & Push a Harbor / test (push) Failing after 3s
Build Producción & Push a Harbor / build (push) Has been skipped
Aduanasoft/plantillas-proyectos/pipeline/head There was a failure building this commit
feat: plantilla base workspace SaaS
2026-07-21 13:59:00 -05:00

11 lines
335 B
Python

from contextvars import ContextVar
from typing import Optional, Dict, Any
_user_context: ContextVar[Optional[Dict[str, Any]]] = ContextVar("user_context", default=None)
def get_user_context() -> Optional[Dict[str, Any]]:
return _user_context.get()
def set_user_context(user: Dict[str, Any]) -> None:
_user_context.set(user)