Skip to content

Commit

Permalink
Read API_URL from environment variable if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
prouast committed Jul 6, 2024
1 parent 2b57360 commit 998b20c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies = [
"numpy",
"onnxruntime",
"prpy[ffmpeg,numpy_min]>=0.2.7",
"python-dotenv",
"pyyaml",
"requests",
]
Expand Down
6 changes: 6 additions & 0 deletions vitallens/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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')

0 comments on commit 998b20c

Please sign in to comment.