Skip to main content

Type annotated AWS SDK for boto3, aiobotocore, and aioboto3.

Project description

boto34

There are type annotations for it. No exceptions.

Type annotated AWS SDK for Python. Adds static type checking and code completions for your boto3, aiobotocore, and aioboto3 code without affecting runtime.

This package is part of mypy_boto3_builder project.

Features

  • Type safety for all 400+ AWS services
  • Auto-completion for every client, resource, request, response, waiter, and paginator
  • Support for boto3, aiobotocore and aioboto3

What is not included

  • No drop-in replacement, you need to rewrite your code a bit
  • No wrappers around clients and resources
  • No porn popup ads (?)

Quickstart

boto3 / botocore

Install boto34 for boto3: pip install 'boto34[boto3]'

Then, rewrite your code:

from boto34.boto3 import Session

# this is a wrapper for boto3.Session, arguments are the same
# all services are accessible as attributes
session = Session()

# this is a boto3 Client for s3 service
# no wrappers and fully type annotated
s3_client = session.s3.client(region_name="us-east-1")

# same for ServiceResource
s3_resource = session.s3.resource(region_name="us-east-1")

Full list of supported AWS services can be found in services.md.

aiobotocore

Install boto34 for aiobotocore: pip install 'boto34[aiobotocore]'

Then, rewrite your code:

from boto34.aiobotocore import get_session

# this is a wrapper for aiobotocore.Session/get_session, arguments are the same
# all services are accessible as attributes
session = get_session()

# this is a aiobotocore Client for s3 service
# no wrappers and fully type annotated
async with session.s3.create_client(region_name="us-east-1") as s3_client:
    ...

Full list of supported AWS services can be found in services.md.

aioboto3

Install boto34 for aioboto3: pip install 'boto34[aioboto3]'

Then, rewrite your code:

from boto34.aioboto3 import Session

# this is a wrapper for aioboto3.Session, arguments are the same
# all services are accessible as attributes
session = Session()

# this is a aioboto3 Client for s3 service
# no wrappers and fully type annotated
async with session.s3.client(region_name="us-east-1") as s3_client:
    ...

# same for ServiceResource
async with session.s3.resource(region_name="us-east-1") as s3_resource:
    ...

Full list of supported AWS services can be found in services.md.

How it works

boto3 / botocore

boto34 provides boto34.boto3 wrapper for boto3 and botocore session to add type annotations to all classes and methods.

Type annotations are powered by:

aioboto3 / aiobotocore

boto34 provides boto34.aioboto3 wrapper for aioboto3 session to add type annotations to all classes and methods. If you use aiobotocore directly, you can use boto34.aiobotocore wrapper.

Type annotations are powered by:

Versioning

boto34 version is not related to boto3 version and follows Python Packaging version specifiers.

Latest changes

Full changelog can be found in Releases.

Project details


Download files

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

Source Distribution

boto34-0.1.0.tar.gz (357.3 kB view details)

Uploaded Source

Built Distribution

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

boto34-0.1.0-py3-none-any.whl (861.8 kB view details)

Uploaded Python 3

File details

Details for the file boto34-0.1.0.tar.gz.

File metadata

  • Download URL: boto34-0.1.0.tar.gz
  • Upload date:
  • Size: 357.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.3

File hashes

Hashes for boto34-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2f436b8a6975e2070a0e07a18fb9c7f4bf89e1e75512da5ce09b0c4ed794d388
MD5 bdd2327b9eb048e41db2507a786fe749
BLAKE2b-256 1f13ae8f46097e9d8d47ff202dd4e71de3d711c0f7fbcfecb95749c20d775077

See more details on using hashes here.

File details

Details for the file boto34-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: boto34-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 861.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.3

File hashes

Hashes for boto34-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f2f9f7a849194a7829fcd88b95febbba7d11731c42178fa9a7679357624fad1
MD5 c8b0be9a4bf2e33d871e1167890f69c2
BLAKE2b-256 56f128c0f6f93078eca129a9d8aa94f050aedfec67740fede778e72942c3bb0c

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