app.core.tenant
Tenant API router - tenant info, usage, and auth bootstrap.
Functions
|
Return public tenant configuration for frontend bootstrapping. |
|
Get the current tenant's usage statistics and limits. |
|
Return information about the authenticated user. |
Classes
|
Session bootstrap response for frontend initialization. |
|
Tenant usage and limits. |
|
User information response. |
- class app.core.tenant.UserInfo(**data)[source]
Bases:
BaseModelUser information response.
- Parameters:
email (str)
id (str)
- email: str
- id: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class app.core.tenant.BootstrapResponse(**data)[source]
Bases:
BaseModelSession bootstrap response for frontend initialization.
- Parameters:
tenant_id (str)
project_names (List[str])
anonymous_allowed (bool)
- tenant_id: str
- project_names: List[str]
- anonymous_allowed: bool
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class app.core.tenant.TenantUsageResponse(**data)[source]
Bases:
BaseModelTenant usage and limits.
- Parameters:
tenant_id (str)
node_count (int)
node_limit (int)
- tenant_id: str
- node_count: int
- node_limit: int
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- async app.core.tenant.bootstrap(client=Depends(dependency=<function get_kumiho_client>, use_cache=True, scope=None))[source]
Return public tenant configuration for frontend bootstrapping.
This replaces the need for NEXT_PUBLIC_TENANT_ID and other build-time secrets. The frontend can call this endpoint to discover tenant configuration dynamically.
- Parameters:
client (Any)
- async app.core.tenant.whoami(project_name=Query(None), client=Depends(dependency=<function get_kumiho_client>, use_cache=True, scope=None), token=Depends(dependency=<function get_user_token>, use_cache=True, scope=None))[source]
Return information about the authenticated user.
Optionally validates membership in a specific project.
- Parameters:
project_name (str | None)
client (Any)
token (str | None)