@@ -8,16 +8,18 @@ class Settings(BaseSettings):
8
8
"""Application settings loaded from environment variables."""
9
9
10
10
# API Configuration
11
- api_key : str = Field (..., description = "Pragma API key" )
12
- pragma_api_base_url : str = Field (..., description = "Pragma API base URL" )
13
- pragma_crawler_api_base_url : str = Field (..., description = "Pragma Crawler API base URL" )
14
- pragma_otel_service_name : str = Field ("pragma-api" , description = "Service name for OpenTelemetry" )
15
- pragma_otel_exporter_otlp_endpoint : str | None = Field (None , description = "OpenTelemetry collector endpoint" )
16
- pragma_environment : str = Field ("development" , description = "Environment" )
17
-
18
- # OpenTelemetry Configuration
19
- otel_exporter_otlp_endpoint : str | None = Field (None , description = "OpenTelemetry collector endpoint" )
20
- otel_service_name : str = Field ("pragma-api" , description = "Service name for OpenTelemetry" )
11
+ api_key : str = Field (..., description = "Pragma API key" , env = "PRAGMA_API_KEY" )
12
+ pragma_api_base_url : str = Field (..., description = "Pragma API base URL" , env = "PRAGMA_API_BASE_URL" )
13
+ pragma_crawler_api_base_url : str = Field (
14
+ ..., description = "Pragma Crawler API base URL" , env = "PRAGMA_CRAWLER_API_BASE_URL"
15
+ )
16
+ pragma_otel_service_name : str = Field (
17
+ "pragma-api" , description = "Service name for OpenTelemetry" , env = "PRAGMA_OTEL_SERVICE_NAME"
18
+ )
19
+ pragma_otel_exporter_otlp_endpoint : str | None = Field (
20
+ None , description = "OpenTelemetry collector endpoint" , env = "PRAGMA_OTEL_EXPORTER_OTLP_ENDPOINT"
21
+ )
22
+ pragma_environment : str = Field ("development" , description = "Environment" , env = "PRAGMA_ENVIRONMENT" )
21
23
22
24
# CORS Settings
23
25
cors_origins : list [str ] = ["*" ]
@@ -54,7 +56,6 @@ def __init__(self, **kwargs):
54
56
class Config :
55
57
env_file = ".env"
56
58
env_file_encoding = "utf-8"
57
- env_prefix = "PRAGMA_" # This will look for PRAGMA_* environment variables
58
59
59
60
60
61
@lru_cache
0 commit comments