Skip to content

Commit 1d4d67c

Browse files
MESH-2092 update deps and add three more client accessors
1 parent 06da755 commit 1d4d67c

File tree

5 files changed

+805
-638
lines changed

5 files changed

+805
-638
lines changed

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
poetry 1.8.5
2-
python 3.10.12 3.9.12 3.11.5
1+
poetry 2.1.4
2+
python 3.13.5 3.12.11 3.11.13 3.10.18 3.9.23

docker-compose.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
version: '3.9'
2-
31
services:
42

53
localstack:

nhs_aws_helpers/__init__.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,15 @@
4444
StandardRetryConditions,
4545
)
4646
from mypy_boto3_athena import AthenaClient
47+
from mypy_boto3_backup import BackupClient
48+
from mypy_boto3_ce import CostExplorerClient
49+
from mypy_boto3_cloudwatch import CloudWatchClient
4750
from mypy_boto3_dynamodb.client import DynamoDBClient
4851
from mypy_boto3_dynamodb.service_resource import DynamoDBServiceResource, Table
4952
from mypy_boto3_dynamodb.type_defs import KeysAndAttributesTypeDef
5053
from mypy_boto3_events import EventBridgeClient
5154
from mypy_boto3_firehose import FirehoseClient
55+
from mypy_boto3_glue import GlueClient
5256
from mypy_boto3_kms.client import KMSClient
5357
from mypy_boto3_lambda.client import LambdaClient
5458
from mypy_boto3_logs.client import CloudWatchLogsClient
@@ -183,6 +187,10 @@ def s3_client(session: Optional[Session] = None, config: Optional[Config] = None
183187
return _aws("s3", "client", session, config) # type: ignore[no-any-return]
184188

185189

190+
def backup_client(session: Optional[Session] = None, config: Optional[Config] = None) -> BackupClient:
191+
return _aws("backup", "client", session, config) # type: ignore[no-any-return]
192+
193+
186194
def register_retry_handler(
187195
client_or_resource: Union[S3ServiceResource, S3Client],
188196
on_error: Optional[Callable] = None,
@@ -305,6 +313,18 @@ def secrets_client(session: Optional[Session] = None, config: Optional[Config] =
305313
return _aws("secretsmanager", "client", session, config) # type: ignore[no-any-return]
306314

307315

316+
def glue_client(session: Optional[Session] = None, config: Optional[Config] = None) -> GlueClient:
317+
return _aws("glue", "client", session, config) # type: ignore[no-any-return]
318+
319+
320+
def cost_explorer_client(session: Optional[Session] = None, config: Optional[Config] = None) -> CostExplorerClient:
321+
return _aws("ce", "client", session, config) # type: ignore[no-any-return]
322+
323+
324+
def cloudwatch_client(session: Optional[Session] = None, config: Optional[Config] = None) -> CloudWatchClient:
325+
return _aws("cloudwatch", "client", session, config) # type: ignore[no-any-return]
326+
327+
308328
def secret_value(name: str, session: Optional[Session] = None, config: Optional[Config] = None) -> str:
309329
return secrets_client(session=session, config=config).get_secret_value(SecretId=name)["SecretString"]
310330

poetry.lock

Lines changed: 778 additions & 631 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ repository = "https://github.com/NHSDigital/nhs-aws-helpers"
1515
# core dependencies
1616
python = ">=3.9,<4.0"
1717
boto3 = "^1.38.14"
18-
boto3-stubs = {extras = ["s3", "ssm", "secretsmanager", "dynamodb", "stepfunctions", "sqs", "lambda", "logs", "ses", "sns", "events", "kms", "firehose", "athena"], version = "^1.38.6"}
18+
boto3-stubs = {extras = ["s3", "ssm", "secretsmanager", "dynamodb", "stepfunctions", "sqs", "lambda", "logs", "ses", "sns", "events", "kms", "firehose", "athena", "glue", "ce", "cloudwatch", "backup"], version = "^1.38.6"}
1919
botocore-stubs = "^1.38.46"
2020

2121

@@ -43,7 +43,7 @@ pytest = ["pytest", "petname"]
4343

4444
[tool.black]
4545
line-length = 120
46-
target-version = ['py39', 'py310', 'py311']
46+
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
4747
include = '\.pyi?$'
4848
#extend-exclude = '''
4949
#/(
@@ -139,13 +139,15 @@ check_untyped_defs = true
139139
[tool.tox]
140140
legacy_tox_ini = """
141141
[tox]
142-
envlist = py39,py310,py311
142+
envlist = py39,py310,py311,py312,py313
143143
144144
[gh-actions]
145145
python =
146146
3.9: py39
147147
3.10: py310
148148
3.11: py311
149+
3.12: py312
150+
3.13: py313
149151
150152
[testenv]
151153
deps =

0 commit comments

Comments
 (0)