Skip to content

S3 module#

Index > S3

Auto-generated documentation for S3 type annotations stubs module types-aiobotocore-s3.

How to install#

From PyPI with pip#

Install types-aiobotocore for S3 service.

# install with aiobotocore type annotations
python -m pip install 'types-aiobotocore[s3]'


# Lite version does not provide session.client/resource overloads
# it is more RAM-friendly, but requires explicit type annotations
python -m pip install 'types-aiobotocore-lite[s3]'


# standalone installation
python -m pip install types-aiobotocore-s3

How to uninstall#

python -m pip uninstall -y types-aiobotocore-s3

Usage#

Code samples can be found in Examples.

S3Client#

Type annotations and code completion for session.create_client("s3") as S3Client boto3 documentation

# S3Client usage example

from aiobotocore.session import get_session

from types_aiobotocore_s3.client import S3Client


session = get_session()
async with session.create_client("s3") as client:
    client: S3Client

Paginators#

Type annotations and code completion for paginators from session.create_client("s3").get_paginator("...").

# ListMultipartUploadsPaginator usage example

from types_aiobotocore_s3.paginator import ListMultipartUploadsPaginator

def get_list_multipart_uploads_paginator() -> ListMultipartUploadsPaginator:
    return client.get_paginator("list_multipart_uploads"))

Waiters#

Type annotations and code completion for waiters from session.create_client("s3").get_waiter("...").

# BucketExistsWaiter usage example

from types_aiobotocore_s3.waiter import BucketExistsWaiter

def get_bucket_exists_waiter() -> BucketExistsWaiter:
    return Session().client("s3").get_waiter("bucket_exists")

S3ServiceResource#

Type annotations and code completion for session.resource("s3") as S3ServiceResource boto3 documentation

# S3ServiceResource usage example

from types_aiobotocore_s3.service_resource import S3ServiceResource

Collections#

Type annotations and code completion for collections from session.resource("s3").*.

# ServiceResourceBucketsCollection usage example

from types_aiobotocore_s3.service_resource import ServiceResourceBucketsCollection

def get_collection() -> ServiceResourceBucketsCollection:
    return resource.buckets

Resources#

Type annotations and code completion for additional resources from session.resource("s3").*.

# Bucket usage example

from types_aiobotocore_s3.service_resource import Bucket

def get_resource() -> Bucket:
    return resource.Bucket(...)

Literals#

Type annotations for literals used in methods and schema.

# AnalyticsS3ExportFileFormatType usage example

from types_aiobotocore_s3.literals import AnalyticsS3ExportFileFormatType

def get_value() -> AnalyticsS3ExportFileFormatType:
    return "CSV"

Type definitions#

Type annotations for type definitions used in methods and schema.