sumo-wrapper-python 1.0.27__tar.gz → 1.0.29__tar.gz

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.
Files changed (46) hide show
  1. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/PKG-INFO +1 -1
  2. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo/wrapper/_auth_provider.py +14 -11
  3. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo/wrapper/_version.py +2 -2
  4. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo/wrapper/sumo_client.py +1 -1
  5. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo_wrapper_python.egg-info/PKG-INFO +1 -1
  6. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/.github/workflows/build_docs.yaml +0 -0
  7. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/.github/workflows/linting.yml +0 -0
  8. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/.github/workflows/publish_release.yml +0 -0
  9. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/.github/workflows/pytest.yml +0 -0
  10. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/.gitignore +0 -0
  11. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/.pre-commit-config.yaml +0 -0
  12. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/.readthedocs.yaml +0 -0
  13. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/CONTRIBUTING.md +0 -0
  14. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/LICENSE +0 -0
  15. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/README.md +0 -0
  16. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/SECURITY.md +0 -0
  17. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/docs/Makefile +0 -0
  18. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/docs/_static/equinor-logo.png +0 -0
  19. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/docs/_static/equinor-logo2.jpg +0 -0
  20. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/docs/_static/equinor_logo.jpg +0 -0
  21. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/docs/_static/equinor_logo_only.jpg +0 -0
  22. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/docs/_templates/layout.html +0 -0
  23. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/docs/api.rst +0 -0
  24. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/docs/conf.py +0 -0
  25. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/docs/index.rst +0 -0
  26. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/docs/make.bat +0 -0
  27. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/docs/sumo-wrapper-python.rst +0 -0
  28. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/pyproject.toml +0 -0
  29. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/setup.cfg +0 -0
  30. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo/__init__.py +0 -0
  31. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo/wrapper/__init__.py +0 -0
  32. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo/wrapper/_blob_client.py +0 -0
  33. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo/wrapper/_decorators.py +0 -0
  34. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo/wrapper/_logging.py +0 -0
  35. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo/wrapper/_retry_strategy.py +0 -0
  36. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo/wrapper/config.py +0 -0
  37. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo/wrapper/login.py +0 -0
  38. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo_wrapper_python.egg-info/SOURCES.txt +0 -0
  39. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo_wrapper_python.egg-info/dependency_links.txt +0 -0
  40. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo_wrapper_python.egg-info/entry_points.txt +0 -0
  41. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo_wrapper_python.egg-info/requires.txt +0 -0
  42. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/src/sumo_wrapper_python.egg-info/top_level.txt +0 -0
  43. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/tests/conftest.py +0 -0
  44. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/tests/test_sumo_thin_client.py +0 -0
  45. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/tests/testdata/case.yml +0 -0
  46. {sumo_wrapper_python-1.0.27 → sumo_wrapper_python-1.0.29}/tests/testdata/surface.yml +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sumo-wrapper-python
3
- Version: 1.0.27
3
+ Version: 1.0.29
4
4
  Summary: Python wrapper for the Sumo API
5
5
  Author: Equinor
6
6
  License: Apache License
@@ -432,6 +432,17 @@ def get_auth_provider(
432
432
  devicecode=False,
433
433
  case_uuid=None,
434
434
  ) -> AuthProvider:
435
+ if all(
436
+ os.getenv(x)
437
+ for x in [
438
+ "AZURE_FEDERATED_TOKEN_FILE",
439
+ "AZURE_TENANT_ID",
440
+ "AZURE_CLIENT_ID",
441
+ "AZURE_AUTHORITY_HOST",
442
+ ]
443
+ ):
444
+ return AuthProviderManaged(resource_id)
445
+ # ELSE
435
446
  if refresh_token:
436
447
  return AuthProviderRefreshToken(
437
448
  refresh_token, client_id, authority, resource_id
@@ -443,6 +454,9 @@ def get_auth_provider(
443
454
  if os.path.exists(get_token_path(resource_id, ".sharedkey", case_uuid)):
444
455
  return AuthProviderSumoToken(resource_id, case_uuid)
445
456
  # ELSE
457
+ if os.path.exists(get_token_path(resource_id, ".sharedkey")):
458
+ return AuthProviderSumoToken(resource_id)
459
+ # ELSE
446
460
  if os.path.exists(get_token_path(resource_id, ".token")):
447
461
  auth_silent = AuthProviderSilent(client_id, authority, resource_id)
448
462
  token = auth_silent.get_token()
@@ -470,17 +484,6 @@ def get_auth_provider(
470
484
  # under Equinor compliant device policy
471
485
  return AuthProviderDeviceCode(client_id, authority, resource_id)
472
486
  # ELSE
473
- if all(
474
- os.getenv(x)
475
- for x in [
476
- "AZURE_FEDERATED_TOKEN_FILE",
477
- "AZURE_TENANT_ID",
478
- "AZURE_CLIENT_ID",
479
- "AZURE_AUTHORITY_HOST",
480
- ]
481
- ):
482
- return AuthProviderManaged(resource_id)
483
- # ELSE
484
487
  return AuthProviderNone(resource_id)
485
488
 
486
489
 
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '1.0.27'
21
- __version_tuple__ = version_tuple = (1, 0, 27)
20
+ __version__ = version = '1.0.29'
21
+ __version_tuple__ = version_tuple = (1, 0, 29)
@@ -33,7 +33,7 @@ class SumoClient:
33
33
  self,
34
34
  env: str,
35
35
  token: Optional[str] = None,
36
- interactive: bool = False,
36
+ interactive: bool = True,
37
37
  devicecode: bool = False,
38
38
  verbosity: str = "CRITICAL",
39
39
  retry_strategy=RetryStrategy(),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sumo-wrapper-python
3
- Version: 1.0.27
3
+ Version: 1.0.29
4
4
  Summary: Python wrapper for the Sumo API
5
5
  Author: Equinor
6
6
  License: Apache License