boto3-refresh-session 2.0.9__tar.gz → 2.0.10__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 (17) hide show
  1. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/PKG-INFO +1 -1
  2. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/boto3_refresh_session/__init__.py +1 -1
  3. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/boto3_refresh_session/methods/custom.py +3 -2
  4. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/boto3_refresh_session/methods/ecs.py +3 -3
  5. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/boto3_refresh_session/methods/iot/certificate.typed +2 -2
  6. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/boto3_refresh_session/methods/iot/cognito.typed +2 -2
  7. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/boto3_refresh_session/methods/sts.py +3 -2
  8. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/boto3_refresh_session/utils.py +3 -0
  9. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/pyproject.toml +1 -1
  10. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/LICENSE +0 -0
  11. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/NOTICE +0 -0
  12. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/README.md +0 -0
  13. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/boto3_refresh_session/exceptions.py +0 -0
  14. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/boto3_refresh_session/methods/__init__.py +0 -0
  15. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/boto3_refresh_session/methods/iot/__init__.typed +0 -0
  16. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/boto3_refresh_session/methods/iot/core.typed +0 -0
  17. {boto3_refresh_session-2.0.9 → boto3_refresh_session-2.0.10}/boto3_refresh_session/session.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: boto3-refresh-session
3
- Version: 2.0.9
3
+ Version: 2.0.10
4
4
  Summary: A simple Python package for refreshing the temporary security credentials in a boto3.session.Session object automatically.
5
5
  License: MIT
6
6
  Keywords: boto3,botocore,aws,sts,ecs,credentials,token,refresh
@@ -4,7 +4,7 @@ from .methods.sts import STSRefreshableSession
4
4
  from .session import RefreshableSession
5
5
 
6
6
  __all__ = ["RefreshableSession"]
7
- __version__ = "2.0.9"
7
+ __version__ = "2.0.10"
8
8
  __title__ = "boto3-refresh-session"
9
9
  __author__ = "Mike Letts"
10
10
  __maintainer__ = "Mike Letts"
@@ -9,6 +9,7 @@ from ..session import BaseRefreshableSession
9
9
  from ..utils import (
10
10
  CustomCredentialsMethod,
11
11
  CustomCredentialsMethodArgs,
12
+ Identity,
12
13
  TemporaryCredentials,
13
14
  refreshable_session,
14
15
  )
@@ -106,12 +107,12 @@ class CustomRefreshableSession(BaseRefreshableSession, registry_key="custom"):
106
107
 
107
108
  return credentials
108
109
 
109
- def get_identity(self) -> dict[str, str]:
110
+ def get_identity(self) -> Identity:
110
111
  """Returns metadata about the custom credential getter.
111
112
 
112
113
  Returns
113
114
  -------
114
- dict[str, str]
115
+ Identity
115
116
  Dict containing information about the custom credential getter.
116
117
  """
117
118
 
@@ -8,7 +8,7 @@ import requests
8
8
 
9
9
  from ..exceptions import BRSError, BRSWarning
10
10
  from ..session import BaseRefreshableSession
11
- from ..utils import TemporaryCredentials, refreshable_session
11
+ from ..utils import Identity, TemporaryCredentials, refreshable_session
12
12
 
13
13
  _ECS_CREDENTIALS_RELATIVE_URI = "AWS_CONTAINER_CREDENTIALS_RELATIVE_URI"
14
14
  _ECS_CREDENTIALS_FULL_URI = "AWS_CONTAINER_CREDENTIALS_FULL_URI"
@@ -101,12 +101,12 @@ class ECSRefreshableSession(BaseRefreshableSession, registry_key="ecs"):
101
101
  "expiry_time": credentials.get("Expiration"), # already ISO8601
102
102
  }
103
103
 
104
- def get_identity(self) -> dict[str, str]:
104
+ def get_identity(self) -> Identity:
105
105
  """Returns metadata about ECS.
106
106
 
107
107
  Returns
108
108
  -------
109
- dict[str, str]
109
+ Identity
110
110
  Dict containing metadata about ECS.
111
111
  """
112
112
 
@@ -4,7 +4,7 @@ from pathlib import Path
4
4
  from typing import Any
5
5
 
6
6
  from ...exceptions import BRSError
7
- from ...utils import PKCS11, TemporaryCredentials, refreshable_session
7
+ from ...utils import Identity, PKCS11, TemporaryCredentials, refreshable_session
8
8
  from .core import BaseIoTRefreshableSession
9
9
 
10
10
 
@@ -52,4 +52,4 @@ class IoTCertificateRefreshableSession(
52
52
 
53
53
  def _get_credentials(self) -> TemporaryCredentials: ...
54
54
 
55
- def get_identity(self) -> dict[str, Any]: ...
55
+ def get_identity(self) -> Identity: ...
@@ -2,7 +2,7 @@ __all__ = ["IoTCognitoRefreshableSession"]
2
2
 
3
3
  from typing import Any
4
4
 
5
- from ...utils import TemporaryCredentials, refreshable_session
5
+ from ...utils import Identity, TemporaryCredentials, refreshable_session
6
6
  from .core import BaseIoTRefreshableSession
7
7
 
8
8
 
@@ -14,4 +14,4 @@ class IoTCognitoRefreshableSession(
14
14
 
15
15
  def _get_credentials(self) -> TemporaryCredentials: ...
16
16
 
17
- def get_identity(self) -> dict[str, Any]: ...
17
+ def get_identity(self) -> Identity: ...
@@ -8,6 +8,7 @@ from ..exceptions import BRSWarning
8
8
  from ..session import BaseRefreshableSession
9
9
  from ..utils import (
10
10
  AssumeRoleParams,
11
+ Identity,
11
12
  STSClientParams,
12
13
  TemporaryCredentials,
13
14
  refreshable_session,
@@ -85,12 +86,12 @@ class STSRefreshableSession(BaseRefreshableSession, registry_key="sts"):
85
86
  "expiry_time": temporary_credentials.get("Expiration").isoformat(),
86
87
  }
87
88
 
88
- def get_identity(self) -> dict[str, Any]:
89
+ def get_identity(self) -> Identity:
89
90
  """Returns metadata about the identity assumed.
90
91
 
91
92
  Returns
92
93
  -------
93
- dict[str, Any]
94
+ Identity
94
95
  Dict containing caller identity according to AWS STS.
95
96
  """
96
97
 
@@ -55,6 +55,9 @@ RegistryKey = TypeVar("RegistryKey", bound=str)
55
55
  #: Type alias for a generic refreshable session type.
56
56
  BRSSessionType = TypeVar("BRSSessionType", bound="BRSSession")
57
57
 
58
+ #: Type alias for values returned by get_identity
59
+ Identity: TypeAlias = dict[str, Any]
60
+
58
61
 
59
62
  def refreshable_session(
60
63
  cls: type[BRSSessionType],
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "boto3-refresh-session"
3
- version = "2.0.9"
3
+ version = "2.0.10"
4
4
  description = "A simple Python package for refreshing the temporary security credentials in a boto3.session.Session object automatically."
5
5
  authors = [
6
6
  {name = "Mike Letts",email = "lettsmt@gmail.com"}