mirror of
https://github.com/DragonMinded/bemaniutils.git
synced 2026-03-28 20:55:06 -05:00
23 lines
436 B
Python
23 lines
436 B
Python
from typing import Optional, TYPE_CHECKING
|
|
|
|
|
|
if TYPE_CHECKING:
|
|
from flask.ctx import _AppCtxGlobals
|
|
from flask_caching import Cache
|
|
|
|
from bemani.data import Config, Data, UserID
|
|
|
|
class RequestGlobals(_AppCtxGlobals):
|
|
config: Config
|
|
cache: Cache
|
|
data: Data
|
|
sessionID: Optional[str]
|
|
userID: Optional[UserID]
|
|
|
|
g = RequestGlobals()
|
|
else:
|
|
from flask import g
|
|
|
|
|
|
__all__ = ["g"]
|