Skip to main content

Type annotations for boto3 1.39.0 module generated with mypy-boto3-builder 8.11.0

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.39.0

Generated with mypy-boto3-builder 8.11.0.

More information can be found on types-boto3 page.

See how it helps to find and fix potential bugs:

types-boto3 demo

How to install

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

# Install type annotations for boto3 services you use
python -m pip install 'types-boto3[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 'types-boto3-lite[s3,ec2]'

Usage

Provides ServiceName and ResourceServiceName literals:

from typing import overload

import boto3
from botocore.client import BaseClient
from types_boto3.literals import ServiceName
from types_boto3_ec2.client import EC2Client
from types_boto3_ec2.literals import EC2ServiceName
from types_boto3_s3.client import S3Client
from types_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 Python Packaging version specifiers.

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.39.0.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

mypy_boto3-1.39.0-py3-none-any.whl (22.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mypy_boto3-1.39.0.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for mypy_boto3-1.39.0.tar.gz
Algorithm Hash digest
SHA256 8c775c47afc6a2117b9f4487afb6622b864f9d96a5461ca58a1a10613c36b47b
MD5 1e95436c71c757db111ba1e93aba0c55
BLAKE2b-256 844e14b4dd044d2d2ea3fda373d2c35dc3b759112629c080ad37fff87eec8835

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mypy_boto3-1.39.0-py3-none-any.whl
  • Upload date:
  • Size: 22.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for mypy_boto3-1.39.0-py3-none-any.whl
Algorithm Hash digest
SHA256 abb851683297ba27d76fb1e7fd39d89e8603f44f4d372f54373b46ba15a95df3
MD5 a1cf4f92a820f272c4e24d443f932c5a
BLAKE2b-256 fcbcbaf5ee3e3a9ca236310834ecfc805a23a4c3c8ddfc8fc89aa90bc79f15b1

See more details on using hashes here.

Supported by

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