Skip to content

Commit 7e28975

Browse files
committed
Add version_label property
1 parent a47ca78 commit 7e28975

File tree

5 files changed

+434
-386
lines changed

5 files changed

+434
-386
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
## 2.2.0 - 2024-11-26
11+
12+
### Added
13+
14+
- Support the `VersionLabel` response element (as the `version_label` property)
15+
- Bump boto3 and related libraries
16+
1017
## 2.1.2 - 2024-06-18
1118

1219
### Changed

appconfig_helper/appconfig_helper.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def __init__(
7575
self._fetch_on_read = fetch_on_read
7676
self._next_config_token = None # type: Optional[str]
7777
self._poll_interval = max_config_age
78+
self._version_label = None # type: Optional[str]
7879
if fetch_on_init:
7980
self.update_config()
8081

@@ -116,6 +117,11 @@ def content_type(self) -> Union[None, str]:
116117
"""The content type of the configuration retrieved from AppConfig."""
117118
return self._content_type
118119

120+
@property
121+
def version_label(self) -> Optional[str]:
122+
"""The version label of the configuration retrieved from AppConfig."""
123+
return self._version_label
124+
119125
def start_session(self) -> None:
120126
"""Start the config session and receive the next config token and poll interval"""
121127
response = self._client.start_configuration_session(
@@ -190,4 +196,5 @@ def update_config(self, force_update: bool = False) -> bool:
190196
self._last_update_time = time.time()
191197
self._raw_config = content
192198
self._content_type = response["ContentType"]
199+
self._version_label = response["VersionLabel"]
193200
return True

0 commit comments

Comments
 (0)