registry¶
- class litestar.stores.registry.StoreRegistry[原始碼]¶
基底類別:
objectRegistry for
Storeinstances.- __init__(stores: dict[str, Store] | None = None, default_factory: Callable[[str], Store] = <function default_default_factory>) None[原始碼]¶
初始化
StoreRegistry。- 參數:
stores¶ -- A dictionary mapping store names to stores, used to initialize the registry
default_factory¶ -- A callable used by
StoreRegistry.get()to provide a store, if the requested name hasn't been registered yet. This callable receives the requested name and should return aStoreinstance.