settings
PixelApiSettings ¶
Bases: BaseSettings
Settings for the Pixel API client
Source code in src/pixel_client/settings.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |
PIXEL_ENV
class-attribute
instance-attribute
¶
PIXEL_ENV: Literal["dev", "test", "prod"] = Field(
validation_alias=pixel_env_choices, default="prod"
)
PIXEL_USERNAME
class-attribute
instance-attribute
¶
PIXEL_USERNAME: str = Field(
validation_alias=pixel_username_choices
)
The client secret for the Keycloak server
PIXEL_PASSWORD
class-attribute
instance-attribute
¶
PIXEL_PASSWORD: SecretStr = Field(
validation_alias=pixel_password_choices
)
The password for the Keycloak
PIXEL_TENANT
class-attribute
instance-attribute
¶
PIXEL_TENANT: str = Field(
validation_alias=pixel_realm_choices
)
The realm for the Keycloak server
PIXEL_SERVER_URL_OVERRIDE
class-attribute
instance-attribute
¶
PIXEL_SERVER_URL_OVERRIDE: str | None = Field(
alias="PIXEL_SERVER_URL", default=None
)
PIXEL_API_URL_OVERRIDE
class-attribute
instance-attribute
¶
PIXEL_API_URL_OVERRIDE: str | None = Field(
alias="PIXEL_API_URL", default=None
)
PIXEL_CLIENT_NO_VERSION_CHECK
class-attribute
instance-attribute
¶
PIXEL_CLIENT_NO_VERSION_CHECK: bool = False
If True, the client will not check for a newer version of the pixel-client package on startup.
from_env_file
classmethod
¶
from_env_file(env_file: Path | str) -> PixelApiSettings
Instantiate the settings from an environment file.
Warning
Environment variables will always take precedence over the values in the file.
Source code in src/pixel_client/settings.py
18 19 20 21 22 23 24 25 | |