Skip to content
This repository was archived by the owner on Nov 5, 2022. It is now read-only.

Commit 86a71ae

Browse files
inspect var
1 parent 5987742 commit 86a71ae

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

play.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import os
2+
3+
from pydantic import BaseSettings
4+
5+
6+
os.environ["AUTH_ENABLED"] = "False"
7+
8+
9+
class Settings(BaseSettings):
10+
AUTH_ENABLED: bool
11+
12+
13+
if __name__ == "__main__":
14+
settings = Settings()
15+
16+
print(type(settings.AUTH_ENABLED))

src/opencdms_api/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
from typing import Any, Dict, Optional
23

34
from pydantic import BaseSettings, PostgresDsn, validator
@@ -45,4 +46,5 @@ class Config:
4546
env_file_encoding = "utf-8"
4647

4748

49+
print(os.getenv("AUTH_ENABLED"))
4850
settings = Settings()

0 commit comments

Comments
 (0)