anderson-ufrj commited on
Commit
0bcdb25
·
1 Parent(s): adf8d4f

feat(config): add dados.gov.br API key configuration

Browse files

- Add dados_gov_api_key field to Settings model
- Support loading API key from environment variable
- Include API key in vault secrets integration

Files changed (1) hide show
  1. src/core/config.py +8 -0
src/core/config.py CHANGED
@@ -74,6 +74,12 @@ class Settings(BaseSettings):
74
  description="Portal da Transparência API header key name"
75
  )
76
 
 
 
 
 
 
 
77
  # LLM Configuration
78
  llm_provider: str = Field(
79
  default="groq",
@@ -403,6 +409,8 @@ class Settings(BaseSettings):
403
  config_data["together_api_key"] = api_secrets.together_api_key
404
  if api_secrets.huggingface_api_key:
405
  config_data["huggingface_api_key"] = api_secrets.huggingface_api_key
 
 
406
 
407
  # Create Settings instance with secrets
408
  # Environment variables will still be used for non-secret configuration
 
74
  description="Portal da Transparência API header key name"
75
  )
76
 
77
+ # Dados.gov.br API Configuration
78
+ dados_gov_api_key: Optional[SecretStr] = Field(
79
+ default=None,
80
+ description="Dados.gov.br API key (if required)"
81
+ )
82
+
83
  # LLM Configuration
84
  llm_provider: str = Field(
85
  default="groq",
 
409
  config_data["together_api_key"] = api_secrets.together_api_key
410
  if api_secrets.huggingface_api_key:
411
  config_data["huggingface_api_key"] = api_secrets.huggingface_api_key
412
+ if hasattr(api_secrets, "dados_gov_api_key") and api_secrets.dados_gov_api_key:
413
+ config_data["dados_gov_api_key"] = api_secrets.dados_gov_api_key
414
 
415
  # Create Settings instance with secrets
416
  # Environment variables will still be used for non-secret configuration