diff --git a/pyproject.toml b/pyproject.toml index 9bda575..44f809f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,7 @@ dependencies = [ "numpy", "onnxruntime", "prpy[ffmpeg,numpy_min]>=0.2.7", + "python-dotenv", "pyyaml", "requests", ] diff --git a/vitallens/constants.py b/vitallens/constants.py index 5e57fd8..d33de4b 100644 --- a/vitallens/constants.py +++ b/vitallens/constants.py @@ -18,6 +18,10 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +from dotenv import load_dotenv +import os +load_dotenv() + SECONDS_PER_MINUTE = 60.0 # Minima and maxima of derived vitals @@ -31,3 +35,5 @@ API_MAX_FRAMES = 900 API_OVERLAP = 30 API_URL = "https://api.rouast.com/vitallens-v1" +if 'API_URL' in os.environ: + API_URL = os.getenv('API_URL')