Skip to content

Commit a3c5583

Browse files
author
Geoff Flarity
committed
support for .env files for development
1 parent 2fec247 commit a3c5583

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

centml/sdk/config.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
import os
2-
from pydantic_settings import BaseSettings
2+
from pydantic_settings import BaseSettings, SettingsConfigDict
3+
from pathlib import Path
34

45

56
class Config(BaseSettings):
7+
8+
# It is possible to override the default values by setting the environment variables
9+
model_config = SettingsConfigDict(env_file=Path('.env'))
10+
611
CENTML_WEB_URL: str = "https://app.centml.com/"
712
CENTML_CONFIG_PATH: str = os.path.expanduser("~/.centml")
813
CENTML_CRED_FILE: str = "credentials.json"

0 commit comments

Comments
 (0)