Skip to content

Commit 40ace47

Browse files
fix config
1 parent f472591 commit 40ace47

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

scripts/demo-meta/osparc_webapi.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
SecretStr,
2323
ValidationError,
2424
)
25-
from pydantic_settings import BaseSettings
25+
from pydantic_settings import BaseSettings, SettingsConfigDict
2626

2727
log = logging.getLogger(__name__)
2828
logging.basicConfig(level=getattr(logging, os.environ.get("LOG_LEVEL", "INFO")))
@@ -201,12 +201,11 @@ class ClientSettings(BaseSettings):
201201
OSPARC_USER_EMAIL: EmailStr
202202
OSPARC_USER_PASSWORD: SecretStr
203203

204-
class Config:
205-
env_file = ".env-osparc-web.ignore"
204+
model_config = SettingsConfigDict(env_file=".env-osparc-web.ignore")
206205

207206

208207
def init():
209-
env_file = Path(ClientSettings.Config.env_file)
208+
env_file = Path(ClientSettings.model_config.env_file)
210209
log.info("Creating %s", f"{env_file}")
211210
kwargs = {}
212211
kwargs["OSPARC_API_URL"] = input("OSPARC_API_URL: ").strip() or None

0 commit comments

Comments
 (0)