Skip to main content

Type annotations for boto3 1.33.5 master module generated with mypy-boto3-builder 7.21.0

Project description

mypy-boto3

PyPI - mypy-boto3 PyPI - Python Version Docs PyPI - Downloads

boto3.typed

Dynamic boto3 1.33.5 type annotations builder for boto3-stubs.

Generated by mypy-boto3-builder 7.21.0.

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 mypy-boto3

# 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.33.5.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mypy_boto3-1.33.5-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file mypy-boto3-1.33.5.tar.gz.

File metadata

  • Download URL: mypy-boto3-1.33.5.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for mypy-boto3-1.33.5.tar.gz
Algorithm Hash digest
SHA256 f950a2948e562167b73ba0d3ab4187711e67ff2f26fa1bbb4648928963c827b0
MD5 c49c3c6ead3c0702e1588a6f5393a22b
BLAKE2b-256 e821e1367f5e0a602386c543d5006e252a2a45724832d39cf8483da9c0b65ade

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mypy_boto3-1.33.5-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for mypy_boto3-1.33.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0861b5909003eb5d1091782cc08746958f70f2b02e2c99bc06a5626000028c97
MD5 16700b04ff883855a141025189d953d6
BLAKE2b-256 00601a5f15e41771b98c222d1e3c0a3dc485db9a2afc2b4d5f5d1985b10005f5

See more details on using hashes here.

Supported by

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