galileo_protect.helpers package

Submodules

galileo_protect.helpers.config module

pydantic settings ProtectConfig

Bases: GalileoConfig

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Show JSON schema
{
   "title": "ProtectConfig",
   "type": "object",
   "properties": {
      "console_url": {
         "format": "uri",
         "maxLength": 2083,
         "minLength": 1,
         "title": "Console Url",
         "type": "string"
      },
      "username": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Username"
      },
      "password": {
         "anyOf": [
            {
               "format": "password",
               "type": "string",
               "writeOnly": true
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Password"
      },
      "api_key": {
         "anyOf": [
            {
               "format": "password",
               "type": "string",
               "writeOnly": true
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Api Key"
      },
      "jwt_token": {
         "anyOf": [
            {
               "format": "password",
               "type": "string",
               "writeOnly": true
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Jwt Token"
      },
      "current_user": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Current User"
      },
      "config_filename": {
         "default": "protect-config.json",
         "title": "Config Filename",
         "type": "string"
      },
      "project_id": {
         "anyOf": [
            {
               "format": "uuid4",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Project Id"
      },
      "stage_name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stage Name"
      },
      "stage_id": {
         "anyOf": [
            {
               "format": "uuid4",
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stage Id"
      }
   },
   "required": [
      "console_url"
   ]
}

Config:
  • extra: str = ignore

  • env_prefix: str = GALILEO_

  • validate_assignment: bool = True

Fields:
Validators:

field config_filename: str = 'protect-config.json'
Validated by:
  • validate_api_url

field project_id: Optional[Annotated[UUID]] = None
Validated by:
  • validate_api_url

field stage_id: Optional[Annotated[UUID]] = None
Validated by:
  • validate_api_url

field stage_name: Optional[str] = None
Validated by:
  • validate_api_url

reset()
Return type:

None

Module contents