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-aioboto3 for S3 service.

# install with aioboto3 type annotations
python -m pip install 'types-aioboto3[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-aioboto3-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.client("s3") as S3Client boto3 documentation

Usage example
from aioboto3.session import Session

from types_aiobotocore_s3.client import S3Client


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

Paginators

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

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.client("s3").get_waiter("...").

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

Usage example
from types_aiobotocore_s3.service_resource import S3ServiceResource

Collections

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

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").*.

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.

Usage example
from types_aiobotocore_s3.literals import AnalyticsS3ExportFileFormatType

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

Typed dictionaries

Type annotations for typed dictionaries used in methods and schema.

Usage example
from types_aiobotocore_s3.type_defs import AbortIncompleteMultipartUploadTypeDef

def get_value() -> AbortIncompleteMultipartUploadTypeDef:
    return {
        "DaysAfterInitiation": ...,
    }