We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cfd9c41 commit 056a4efCopy full SHA for 056a4ef
1 file changed
src/sumo/wrapper/sumo_client.py
@@ -26,6 +26,8 @@
26
"SUMOCONNECTIONINFO", "https://api.sumo.equinor.com/well-known"
27
)
28
29
+well_known = None
30
+
31
32
class SumoClient:
33
"""Authenticate and perform requests to the Sumo API."""
@@ -70,8 +72,9 @@ def __init__(
70
72
"""
71
73
74
logger.setLevel(verbosity)
-
- well_known = httpx.get(WELL_KNOWN).json()
75
+ global well_known
76
+ if well_known is None:
77
+ well_known = httpx.get(WELL_KNOWN).json()
78
if env not in well_known["envs"]:
79
raise ValueError(f"Invalid environment: {env}")
80
0 commit comments