From d1ef748901021ec8fd2a5718fe9433f00dc18708 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Sun, 11 Sep 2022 11:38:59 +0430 Subject: [PATCH] ability to read API_URL variable from env too --- ipinfo/handler_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipinfo/handler_utils.py b/ipinfo/handler_utils.py index 72f9b14..d81a126 100644 --- a/ipinfo/handler_utils.py +++ b/ipinfo/handler_utils.py @@ -9,7 +9,7 @@ from .version import SDK_VERSION # Base URL to make requests against. -API_URL = "https://ipinfo.io" +API_URL = os.environ.get("IPINFO_API_URL", "https://ipinfo.io") # Used to transform incoming responses with country abbreviations into the full # expanded country name, e.g. "PK" -> "Pakistan".