🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

mypy-boto3

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mypy-boto3

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

1.39.0
Source
PyPI
Maintainers
1

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.

Keywords

boto3 type-annotations boto3-stubs mypy mypy-stubs typeshed autocomplete auto-generated

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts