Saravanan666 commited on
Commit
cd843fa
·
verified ·
1 Parent(s): e9d6aaf

Create TestGen/ConfigEnv.py

Browse files
Files changed (1) hide show
  1. TestGen/ConfigEnv.py +19 -0
TestGen/ConfigEnv.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Config class for handling env variables.
2
+ """
3
+ from functools import lru_cache
4
+ from pydantic import BaseSettings
5
+
6
+ class Settings(BaseSettings):
7
+ APP_ID: str
8
+ USER_ID: str
9
+ MODEL_ID: str
10
+ CLARIFAI_PAT: str
11
+ MODEL_VERSION_ID: str
12
+
13
+ class Config:
14
+ env_file = '.env'
15
+
16
+ @lru_cache()
17
+ def get_settings():
18
+ return Settings()
19
+ config = get_settings()