Coverage for polar/integrations/aws/s3/client.py: 83%
10 statements
« prev ^ index » next coverage.py v7.10.6, created at 2025-12-05 15:52 +0000
« prev ^ index » next coverage.py v7.10.6, created at 2025-12-05 15:52 +0000
1from typing import TYPE_CHECKING 1a
3import boto3 1a
4from botocore.config import Config 1a
6from polar.config import settings 1a
8if TYPE_CHECKING: 8 ↛ 9line 8 didn't jump to line 9 because the condition on line 8 was never true1a
9 from mypy_boto3_s3.client import S3Client
12def get_client( 1a
13 *, signature_version: str = settings.AWS_SIGNATURE_VERSION
14) -> "S3Client":
15 return boto3.client( 1a
16 "s3",
17 endpoint_url=settings.S3_ENDPOINT_URL,
18 aws_access_key_id=settings.AWS_ACCESS_KEY_ID,
19 aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY,
20 config=Config(
21 region_name=settings.AWS_REGION, signature_version=signature_version
22 ),
23 )
26client = get_client() 1a
28__all__ = ("client", "get_client") 1a