jupyterhub_ai_gateway.settings module#

Settings module.

class jupyterhub_ai_gateway.settings.Settings(_case_sensitive: bool | None = None, _nested_model_default_partial_update: bool | None = None, _env_prefix: str | None = None, _env_file: DotenvType | None = PosixPath('.'), _env_file_encoding: str | None = None, _env_ignore_empty: bool | None = None, _env_nested_delimiter: str | None = None, _env_parse_none_str: str | None = None, _env_parse_enums: bool | None = None, _cli_prog_name: str | None = None, _cli_parse_args: bool | list[str] | tuple[str, ...] | None = None, _cli_settings_source: CliSettingsSource[Any] | None = None, _cli_parse_none_str: str | None = None, _cli_hide_none_type: bool | None = None, _cli_avoid_json: bool | None = None, _cli_enforce_required: bool | None = None, _cli_use_class_docs_for_groups: bool | None = None, _cli_exit_on_error: bool | None = None, _cli_prefix: str | None = None, _cli_flag_prefix_char: str | None = None, _cli_implicit_flags: bool | None = None, _cli_ignore_unknown_args: bool | None = None, _secrets_dir: PathType | None = None, *, jupyterhub_ai_gateway_docs_title: str = 'JupyterHub AI Gateway', jupyterhub_ai_gateway_docs_description: str = 'AI gateway service for JupyterHub.', jupyterhub_ai_gateway_config: str = 'config.yaml', jupyterhub_ai_gateway_metrics: bool = False, jupyterhub_ai_gateway_metrics_namespace: str = 'jupyterhub_ai_gateway', jupyterhub_service_name: str = 'ai-gateway', jupyterhub_service_prefix: str = '', jupyterhub_api_url: str = 'http://localhost:8000/hub/api', jupyterhub_api_token: str = '<service-api-token>', jupyterhub_client_id: str = 'service-ai-gateway', jupyterhub_oauth_callback_url: str = '/oauth_callback', jupyterhub_public_url: str = 'http://localhost:5000', jupyterhub_public_hub_url: str = 'http://localhost:8000')#

Bases: BaseSettings

Settings model.

jupyterhub_ai_gateway_config: str#
jupyterhub_ai_gateway_docs_description: str#
jupyterhub_ai_gateway_docs_title: str#
jupyterhub_ai_gateway_metrics: bool#
jupyterhub_ai_gateway_metrics_namespace: str#
jupyterhub_api_token: str#
jupyterhub_api_url: str#
jupyterhub_client_id: str#
jupyterhub_oauth_callback_url: str#
jupyterhub_public_hub_url: str#
jupyterhub_public_url: str#
jupyterhub_service_name: str#
jupyterhub_service_prefix: str#
model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

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

model_config: ClassVar[SettingsConfigDict] = {'arbitrary_types_allowed': True, 'case_sensitive': False, 'cli_avoid_json': False, 'cli_enforce_required': False, 'cli_exit_on_error': True, 'cli_flag_prefix_char': '-', 'cli_hide_none_type': False, 'cli_ignore_unknown_args': False, 'cli_implicit_flags': False, 'cli_parse_args': None, 'cli_parse_none_str': None, 'cli_prefix': '', 'cli_prog_name': None, 'cli_use_class_docs_for_groups': False, 'env_file': None, 'env_file_encoding': None, 'env_ignore_empty': False, 'env_nested_delimiter': None, 'env_parse_enums': None, 'env_parse_none_str': None, 'env_prefix': '', 'extra': 'forbid', 'json_file': None, 'json_file_encoding': None, 'nested_model_default_partial_update': False, 'protected_namespaces': ('model_', 'settings_'), 'secrets_dir': None, 'toml_file': None, 'validate_default': True, 'yaml_file': None, 'yaml_file_encoding': None}#

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

model_fields: ClassVar[dict[str, FieldInfo]] = {'jupyterhub_ai_gateway_config': FieldInfo(annotation=str, required=False, default='config.yaml'), 'jupyterhub_ai_gateway_docs_description': FieldInfo(annotation=str, required=False, default='AI gateway service for JupyterHub.'), 'jupyterhub_ai_gateway_docs_title': FieldInfo(annotation=str, required=False, default='JupyterHub AI Gateway'), 'jupyterhub_ai_gateway_metrics': FieldInfo(annotation=bool, required=False, default=False), 'jupyterhub_ai_gateway_metrics_namespace': FieldInfo(annotation=str, required=False, default='jupyterhub_ai_gateway'), 'jupyterhub_api_token': FieldInfo(annotation=str, required=False, default='<service-api-token>'), 'jupyterhub_api_url': FieldInfo(annotation=str, required=False, default='http://localhost:8000/hub/api'), 'jupyterhub_client_id': FieldInfo(annotation=str, required=False, default='service-ai-gateway'), 'jupyterhub_oauth_callback_url': FieldInfo(annotation=str, required=False, default='/oauth_callback'), 'jupyterhub_public_hub_url': FieldInfo(annotation=str, required=False, default='http://localhost:8000'), 'jupyterhub_public_url': FieldInfo(annotation=str, required=False, default='http://localhost:5000'), 'jupyterhub_service_name': FieldInfo(annotation=str, required=False, default='ai-gateway'), 'jupyterhub_service_prefix': FieldInfo(annotation=str, required=False, default='')}#

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

This replaces Model.__fields__ from Pydantic V1.

jupyterhub_ai_gateway.settings.settings = Settings(jupyterhub_ai_gateway_docs_title='JupyterHub AI Gateway', jupyterhub_ai_gateway_docs_description='AI gateway service for JupyterHub.', jupyterhub_ai_gateway_config='config.yaml', jupyterhub_ai_gateway_metrics=False, jupyterhub_ai_gateway_metrics_namespace='jupyterhub_ai_gateway', jupyterhub_service_name='ai-gateway', jupyterhub_service_prefix='', jupyterhub_api_url='http://localhost:8000/hub/api', jupyterhub_api_token='<service-api-token>', jupyterhub_client_id='service-ai-gateway', jupyterhub_oauth_callback_url='/oauth_callback', jupyterhub_public_url='http://localhost:5000', jupyterhub_public_hub_url='http://localhost:8000')#

Settings instance.