dapla-toolbelt-metadata 0.2.1__py3-none-any.whl → 0.2.3__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 dapla-toolbelt-metadata might be problematic. Click here for more details.

@@ -5,6 +5,7 @@ import logging
5
5
  import pathlib
6
6
  import uuid
7
7
 
8
+ import google.auth
8
9
  from cloudpathlib import CloudPath
9
10
  from cloudpathlib import GSClient
10
11
  from cloudpathlib import GSPath
@@ -51,7 +52,11 @@ def normalize_path(path: str) -> pathlib.Path | CloudPath:
51
52
  Pathlib compatible object.
52
53
  """
53
54
  if path.startswith(GSPath.cloud_prefix):
54
- client = GSClient(credentials=AuthClient.fetch_google_credentials())
55
+ try:
56
+ credentials, _ = google.auth.default()
57
+ client = GSClient(credentials=credentials)
58
+ except google.auth.exceptions.DefaultCredentialsError:
59
+ client = GSClient(credentials=AuthClient.fetch_google_credentials())
55
60
  return GSPath(path, client=client)
56
61
  return pathlib.Path(path)
57
62
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dapla-toolbelt-metadata
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: Dapla Toolbelt Metadata
5
5
  Home-page: https://github.com/statisticsnorway/dapla-toolbelt-metadata
6
6
  License: MIT
@@ -16,7 +16,8 @@ Classifier: Programming Language :: Python :: 3.12
16
16
  Requires-Dist: arrow (>=1.3.0)
17
17
  Requires-Dist: beautifulsoup4 (>=4.12.3)
18
18
  Requires-Dist: cloudpathlib[gs] (>=0.17.0)
19
- Requires-Dist: dapla-toolbelt (>=1.3.3)
19
+ Requires-Dist: dapla-toolbelt (>=3.0.1)
20
+ Requires-Dist: google-auth-stubs (>=0.3.0,<0.4.0)
20
21
  Requires-Dist: pandas (>=1.4.2)
21
22
  Requires-Dist: pyarrow (>=8.0.0)
22
23
  Requires-Dist: pydantic (>=2.5.2)
@@ -15,8 +15,8 @@ dapla_metadata/datasets/user_info.py,sha256=6cjIhYHUQmCKnhBjvH6GN3B6H3J-pOjc9NdQ
15
15
  dapla_metadata/datasets/utility/__init__.py,sha256=pp6tUcgUbo8iq9OPtFKQrTbLuI3uY7NHptwWSTpasOU,33
16
16
  dapla_metadata/datasets/utility/constants.py,sha256=V9ixHTShK1uBcSesaVoKDSHzAh3CX1ATO-Z3wZHxAKs,2417
17
17
  dapla_metadata/datasets/utility/enums.py,sha256=C-qlB9ZI4Oy3q1ehbuF0GD7lqJJbuaspY_e8BDFu5DU,727
18
- dapla_metadata/datasets/utility/utils.py,sha256=wCRZBB3YwXTB_BaqDABaaeBjVmMZP8z3grjfTxX308k,18018
19
- dapla_toolbelt_metadata-0.2.1.dist-info/LICENSE,sha256=np3IfD5m0ZUofn_kVzDZqliozuiO6wrktw3LRPjyEiI,1073
20
- dapla_toolbelt_metadata-0.2.1.dist-info/METADATA,sha256=f-MfoB7t5lS8BJvjQkt7XyMCnHAYu75_PYnwcXhnOoA,4935
21
- dapla_toolbelt_metadata-0.2.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
22
- dapla_toolbelt_metadata-0.2.1.dist-info/RECORD,,
18
+ dapla_metadata/datasets/utility/utils.py,sha256=rME_N95GPSmVwPC9fXI7b-GNYMyfNcEsryi_iaxUYHU,18223
19
+ dapla_toolbelt_metadata-0.2.3.dist-info/LICENSE,sha256=np3IfD5m0ZUofn_kVzDZqliozuiO6wrktw3LRPjyEiI,1073
20
+ dapla_toolbelt_metadata-0.2.3.dist-info/METADATA,sha256=MVrGvtCZdMI2Xv52xCtw7-g_BC2Udvb2syG9pa7gFYQ,4985
21
+ dapla_toolbelt_metadata-0.2.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
22
+ dapla_toolbelt_metadata-0.2.3.dist-info/RECORD,,