Skip to content

Commit 8f24f89

Browse files
Adding extra="ignore" option to fix pydantic_settings.SettingsConfigDict issue with environement variables (#800)
* Adding extra ignore option in model_config pydantic-settings * lint * update changelog --------- Co-authored-by: vincentsarago <vincent.sarago@gmail.com>
1 parent ffd67af commit 8f24f89

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release Notes
22

3+
## 0.17.3 (2024-03-21)
4+
5+
### titiler.application
6+
7+
* Add `extra="ignore"` option `ApiSettings` to fix pydantic issue when using `.env` file (author @imanshafiei540, https://github.com/developmentseed/titiler/pull/800)
8+
39
## 0.17.2 (2024-03-15)
410

511
### titiler.core

src/titiler/application/titiler/application/settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ class ApiSettings(BaseSettings):
2525
# an API key required to access any endpoint, passed via the ?access_token= query parameter
2626
global_access_token: Optional[str] = None
2727

28-
model_config = SettingsConfigDict(env_prefix="TITILER_API_", env_file=".env")
28+
model_config = SettingsConfigDict(
29+
env_prefix="TITILER_API_", env_file=".env", extra="ignore"
30+
)
2931

3032
@field_validator("cors_origins")
3133
def parse_cors_origin(cls, v):

0 commit comments

Comments
 (0)