jupyterhub_ai_gateway.models module#

Service models.

class jupyterhub_ai_gateway.models.AuthorizationError(*, detail: str)#

Bases: BaseModel

Authorization error response.

detail: str#
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'detail': FieldInfo(annotation=str, required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class jupyterhub_ai_gateway.models.ForbiddenError(*, detail: str)#

Bases: BaseModel

Forbidden error response.

detail: str#
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'detail': FieldInfo(annotation=str, required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class jupyterhub_ai_gateway.models.HealthStatus(*, status: str, version: str)#

Bases: BaseModel

Health status response.

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'status': FieldInfo(annotation=str, required=True), 'version': FieldInfo(annotation=str, required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

status: str#
version: str#
class jupyterhub_ai_gateway.models.HubApiError(*, detail: HubApiErrorDetail)#

Bases: BaseModel

Hub API error response.

detail: HubApiErrorDetail#
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'detail': FieldInfo(annotation=HubApiErrorDetail, required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

class jupyterhub_ai_gateway.models.HubApiErrorDetail(*, msg: str, request_url: str, token: str, response_code: int, hub_response: Any)#

Bases: BaseModel

Hub API error detail.

hub_response: Any#
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'hub_response': FieldInfo(annotation=Any, required=True), 'msg': FieldInfo(annotation=str, required=True), 'request_url': FieldInfo(annotation=str, required=True), 'response_code': FieldInfo(annotation=int, required=True), 'token': FieldInfo(annotation=str, required=True)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

msg: str#
request_url: str#
response_code: int#
token: str#
class jupyterhub_ai_gateway.models.Server(*, name: str, ready: bool, stopped: bool | None = None, pending: str | None = None, url: str, progress_url: str, full_url: str | None = None, full_progress_url: str | None = None, started: datetime, last_activity: datetime, state: Any | None = None, user_options: Any | None = None)#

Bases: BaseModel

Server information response.

full_progress_url: str | None#
full_url: str | None#
last_activity: datetime#
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'full_progress_url': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'full_url': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'last_activity': FieldInfo(annotation=datetime, required=True), 'name': FieldInfo(annotation=str, required=True), 'pending': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'progress_url': FieldInfo(annotation=str, required=True), 'ready': FieldInfo(annotation=bool, required=True), 'started': FieldInfo(annotation=datetime, required=True), 'state': FieldInfo(annotation=Union[Any, NoneType], required=False, default=None), 'stopped': FieldInfo(annotation=Union[bool, NoneType], required=False, default=None), 'url': FieldInfo(annotation=str, required=True), 'user_options': FieldInfo(annotation=Union[Any, NoneType], required=False, default=None)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

name: str#
pending: str | None#
progress_url: str#
ready: bool#
started: datetime#
state: Any | None#
stopped: bool | None#
url: str#
user_options: Any | None#
class jupyterhub_ai_gateway.models.User(*, name: str, admin: bool, roles: List[str] | None = None, groups: List[str] | None = None, server: str | None = None, pending: str | None = None, last_activity: datetime | None = None, servers: Dict[str, Server] | None = None, auth_state: Any | None = None, session_id: str | None = None, scopes: List[str], token_id: str | None = None)#

Bases: BaseModel

User response.

admin: bool#
auth_state: Any | None#
groups: List[str] | None#
last_activity: datetime | None#
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'admin': FieldInfo(annotation=bool, required=True), 'auth_state': FieldInfo(annotation=Union[Any, NoneType], required=False, default=None), 'groups': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'last_activity': FieldInfo(annotation=Union[datetime, NoneType], required=False, default=None), 'name': FieldInfo(annotation=str, required=True), 'pending': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'roles': FieldInfo(annotation=Union[List[str], NoneType], required=False, default=None), 'scopes': FieldInfo(annotation=List[str], required=True), 'server': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'servers': FieldInfo(annotation=Union[Dict[str, Server], NoneType], required=False, default=None), 'session_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'token_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

name: str#
pending: str | None#
roles: List[str] | None#
scopes: List[str]#
server: str | None#
servers: Dict[str, Server] | None#
session_id: str | None#
token_id: str | None#