eodash_catalog 0.0.35__py3-none-any.whl → 0.0.37__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.

Potentially problematic release.


This version of eodash_catalog might be problematic. Click here for more details.

@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2024-present Daniel Santillan <daniel.santillan@eox.at>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "0.0.35"
4
+ __version__ = "0.0.37"
@@ -15,9 +15,10 @@ def get_SH_token(endpoint_config: dict) -> str:
15
15
  if env_id := endpoint_config.get("CustomSHEnvId"):
16
16
  client_id = os.getenv(f"SH_CLIENT_ID_{env_id}", "")
17
17
  client_secret = os.getenv(f"SH_CLIENT_SECRET_{env_id}", "")
18
-
19
- if client_id in _token_cache and _token_cache[client_id]["expires_at"] > time.time():
20
- print("returning from cache")
18
+ # 10 minutes before end of validity
19
+ if client_id in _token_cache and (_token_cache[client_id]["expires_at"] - (60 * 10)) > (
20
+ time.time()
21
+ ):
21
22
  return _token_cache[client_id]["access_token"]
22
23
  # Create a session
23
24
  client = BackendApplicationClient(client_id=client_id)
@@ -29,5 +30,4 @@ def get_SH_token(endpoint_config: dict) -> str:
29
30
  )
30
31
  access_token = token["access_token"]
31
32
  _token_cache[client_id] = {"access_token": access_token, "expires_at": token["expires_at"]}
32
- print("returning directly")
33
33
  return access_token
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: eodash_catalog
3
- Version: 0.0.35
3
+ Version: 0.0.37
4
4
  Summary: This package is intended to help create a compatible STAC catalog for the eodash dashboard client. It supports configuration of multiple endpoint types for information extraction.
5
5
  Project-URL: Documentation, https://github.com/eodash/eodash_catalog#readme
6
6
  Project-URL: Issues, https://github.com/eodash/eodash_catalog/issues
@@ -1,14 +1,14 @@
1
- eodash_catalog/__about__.py,sha256=XROj_01m1eUHyHi51MiSGj8n1eY3AhxttN52YSE0S0I,138
1
+ eodash_catalog/__about__.py,sha256=B64cHhOSkw7dIucD_Sg4Md9DY0He0AfXusjTlkrocNQ,138
2
2
  eodash_catalog/__init__.py,sha256=_W_9emPYf6FUqc0P8L2SmADx6hGSd7PlQV3yRmCk5uM,115
3
3
  eodash_catalog/duration.py,sha256=B6XOZfvNU7SuqpxuVtT1kNKODoOQJXDI6mocvA_U1ik,10816
4
4
  eodash_catalog/endpoints.py,sha256=9cSdB_IczNW9hzOJRrI5_qmgsn4snWvUszN6qtvxZn8,37749
5
5
  eodash_catalog/generate_indicators.py,sha256=0IHhu_0yOUoUtLqiTsoYQ2IrTrq00yZme3UE6pC9PIU,19772
6
- eodash_catalog/sh_endpoint.py,sha256=h4OryUjvO1zEJB3ObnHUmAnXc4YCOxbxNhmDn9UVIk8,1220
6
+ eodash_catalog/sh_endpoint.py,sha256=XjZsZJ5jfJZLQenSTqUhiUZ5YAu9M9nv2KL1Qv3Be-I,1219
7
7
  eodash_catalog/stac_handling.py,sha256=2iJwBbsBZIBqGWOdnpIfSug0SoOjbkutpSbWAeQRECU,17828
8
8
  eodash_catalog/thumbnails.py,sha256=qZDcpQe80ki6lEMKYdZtSnnHH0PUpcoXTvU9bYdPlzU,2260
9
9
  eodash_catalog/utils.py,sha256=YBB-cfS_Z4ErMAuBVizBQg18IMIxJb4amW1MfDGExg0,11666
10
- eodash_catalog-0.0.35.dist-info/METADATA,sha256=YFoc5dq5lxNNAo4hMB5nOSt6AkVqXHLNCEuQOBonJPI,3196
11
- eodash_catalog-0.0.35.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
12
- eodash_catalog-0.0.35.dist-info/entry_points.txt,sha256=kuUQrDG1PtYd8kPjf5XM6H_NtQd9Ozwl0jjiGtAvZSM,87
13
- eodash_catalog-0.0.35.dist-info/licenses/LICENSE.txt,sha256=oJCW5zQxnFD-J0hGz6Zh5Lkpdk1oAndmWhseTmV224E,1107
14
- eodash_catalog-0.0.35.dist-info/RECORD,,
10
+ eodash_catalog-0.0.37.dist-info/METADATA,sha256=Bueg1Sktng7caDVFyPtFTQGqaBEKKg_ee3xDZ2ZHqWw,3196
11
+ eodash_catalog-0.0.37.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
12
+ eodash_catalog-0.0.37.dist-info/entry_points.txt,sha256=kuUQrDG1PtYd8kPjf5XM6H_NtQd9Ozwl0jjiGtAvZSM,87
13
+ eodash_catalog-0.0.37.dist-info/licenses/LICENSE.txt,sha256=oJCW5zQxnFD-J0hGz6Zh5Lkpdk1oAndmWhseTmV224E,1107
14
+ eodash_catalog-0.0.37.dist-info/RECORD,,