mpcontribs-client 5.8.4__py3-none-any.whl → 5.9.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mpcontribs/client/__init__.py +4 -1
- {mpcontribs_client-5.8.4.dist-info → mpcontribs_client-5.9.0.dist-info}/METADATA +1 -1
- mpcontribs_client-5.9.0.dist-info/RECORD +6 -0
- {mpcontribs_client-5.8.4.dist-info → mpcontribs_client-5.9.0.dist-info}/WHEEL +1 -1
- mpcontribs_client-5.8.4.dist-info/RECORD +0 -6
- {mpcontribs_client-5.8.4.dist-info → mpcontribs_client-5.9.0.dist-info}/LICENSE +0 -0
- {mpcontribs_client-5.8.4.dist-info → mpcontribs_client-5.9.0.dist-info}/top_level.txt +0 -0
mpcontribs/client/__init__.py
CHANGED
|
@@ -61,6 +61,7 @@ from tempfile import gettempdir
|
|
|
61
61
|
from plotly.express._chart_types import line as line_chart
|
|
62
62
|
from cachetools import cached, LRUCache
|
|
63
63
|
from cachetools.keys import hashkey
|
|
64
|
+
from pymatgen.core import SETTINGS
|
|
64
65
|
|
|
65
66
|
RETRIES = 3
|
|
66
67
|
MAX_WORKERS = 3
|
|
@@ -886,7 +887,9 @@ class Client(SwaggerClient):
|
|
|
886
887
|
host = os.environ.get("MPCONTRIBS_API_HOST", DEFAULT_HOST)
|
|
887
888
|
|
|
888
889
|
if not apikey:
|
|
889
|
-
apikey = os.environ.get("MPCONTRIBS_API_KEY")
|
|
890
|
+
apikey = os.environ.get("MPCONTRIBS_API_KEY", SETTINGS.get("PMG_MAPI_KEY"))
|
|
891
|
+
if apikey and len(apikey) != 32:
|
|
892
|
+
raise MPContribsClientError(f"Invalid API key: {apikey}")
|
|
890
893
|
|
|
891
894
|
if apikey and headers:
|
|
892
895
|
apikey = None
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
mpcontribs/client/__init__.py,sha256=K4OCUoMpwJvkAbJvM03-TPd5wzQi0RkBpjd8WJBwP7w,96983
|
|
2
|
+
mpcontribs_client-5.9.0.dist-info/LICENSE,sha256=5tG0Niaqw2hnuyZZYkRXLSnfVrZA47COwduU_6caPLM,1074
|
|
3
|
+
mpcontribs_client-5.9.0.dist-info/METADATA,sha256=5zIrQcDW0whyINa0Vnq8PnRIlHvd8tdvyDjPt05p7LE,2572
|
|
4
|
+
mpcontribs_client-5.9.0.dist-info/WHEEL,sha256=OVMc5UfuAQiSplgO0_WdW7vXVGAt9Hdd6qtN4HotdyA,91
|
|
5
|
+
mpcontribs_client-5.9.0.dist-info/top_level.txt,sha256=t8R5L_Dg9oDQMh2gyRFdZGnrzZsr7OjCBTrhTcmimC8,11
|
|
6
|
+
mpcontribs_client-5.9.0.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
mpcontribs/client/__init__.py,sha256=xvHBjJnbIEwA9Ubg9a_sbqp0zbG8rVCoKutiY_cA5M4,96799
|
|
2
|
-
mpcontribs_client-5.8.4.dist-info/LICENSE,sha256=5tG0Niaqw2hnuyZZYkRXLSnfVrZA47COwduU_6caPLM,1074
|
|
3
|
-
mpcontribs_client-5.8.4.dist-info/METADATA,sha256=L9NNJo4IpeKVPQoRnETAc0XuJgYHSA5wEzcPwhhe-gw,2572
|
|
4
|
-
mpcontribs_client-5.8.4.dist-info/WHEEL,sha256=cpQTJ5IWu9CdaPViMhC9YzF8gZuS5-vlfoFihTBC86A,91
|
|
5
|
-
mpcontribs_client-5.8.4.dist-info/top_level.txt,sha256=t8R5L_Dg9oDQMh2gyRFdZGnrzZsr7OjCBTrhTcmimC8,11
|
|
6
|
-
mpcontribs_client-5.8.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|