Add utility function to load all variables
This commit is contained in:
1 parent
a706448846
commit
d7c22e9581
1 file changed
+15
@@ -0,0 +1,15 @@
|
||||
"""
|
||||
util/environemnt.py
|
||||
|
||||
Utility function for loading project environment variables
|
||||
"""
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
def load_environment_variables() -> dict:
|
||||
return {
|
||||
k: v for k, v in os.environ.items()
|
||||
if k.startswith('LP_')
|
||||
}
|
||||
Reference in new issue
Block a user