Skip to main content

Type annotations for boto3 1.35.67 master module generated with mypy-boto3-builder 8.3.1

Project description

mypy-boto3

PyPI - mypy-boto3 PyPI - Python Version Docs ![PyPI - Downloads](https://static.pepy.tech/badge/mypy-boto3

boto3.typed

Dynamic boto3 1.35.67 type annotations builder for boto3-stubs.

Generated by mypy-boto3-builder 8.3.1.

More information can be found on boto3-stubs page.

See how it helps to find and fix potential bugs:

boto3-stubs demo

How to install

# Install this package
python -m pip install boto3-stubs

# Install type annotations for boto3 services you use
python -m pip install 'boto3-stubs[s3,ec2]'

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

Usage

Provides ServiceName and ResourceServiceName literals:

from typing import overload

import boto3
from botocore.client import BaseClient
from mypy_boto3.literals import ServiceName
from mypy_boto3_ec2.client import EC2Client
from mypy_boto3_ec2.literals import EC2ServiceName
from mypy_boto3_s3.client import S3Client
from mypy_boto3_s3.literals import S3ServiceName


@overload
def get_client(service_name: EC2ServiceName) -> EC2Client: ...


@overload
def get_client(service_name: S3ServiceName) -> S3Client: ...


@overload
def get_client(service_name: ServiceName) -> BaseClient: ...


def get_client(service_name: ServiceName) -> BaseClient:
    return boto3.client(service_name)


# type: S3Client, fully type annotated
# All methods and attributes are auto-completed and type checked
s3_client = get_client("s3")

# type: EC2Client, fully type annotated
# All methods and attributes are auto-completed and type checked
ec2_client = get_client("ec2")

# type: BaseClient, only basic type annotations
# Dynamodb-specific methods and attributes are not auto-completed and not type checked
dynamodb_client = get_client("dynamodb")

Latest changes

Full changelog can be found in Releases.

Versioning

mypy-boto3 version is the same as related boto3 version and follows PEP 440 format.

Support and contributing

Please reports any bugs or request new features in mypy_boto3_builder repository.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mypy_boto3-1.35.67.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

mypy_boto3-1.35.67-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file mypy_boto3-1.35.67.tar.gz.

File metadata

  • Download URL: mypy_boto3-1.35.67.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mypy_boto3-1.35.67.tar.gz
Algorithm Hash digest
SHA256 a1eb72e985384389919211e8e7a24fffa1daddcc6561e5d052bfd3e8345e7a75
MD5 0aefee8510935e3897cfeac1a704d886
BLAKE2b-256 3ca60ba9d0c6d44bd6716b5fe0314607150adf3ec99e194aaa5a88c4ebd95857

See more details on using hashes here.

File details

Details for the file mypy_boto3-1.35.67-py3-none-any.whl.

File metadata

  • Download URL: mypy_boto3-1.35.67-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for mypy_boto3-1.35.67-py3-none-any.whl
Algorithm Hash digest
SHA256 32dd2ea41286170638301649edd42739f98fa06084d3c6a9fd1c404ad5e3bc77
MD5 780bff166beec3b9f87cfbadfe4495cc
BLAKE2b-256 27f27850ec6402e47dbd3bead6ea2740a1fda029d22c3e5bcfe93a594fbf5a6a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page