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,aiobotocoreandaioboto3 - Compatible with PyCharm, no 100% CPU load this time
- A decent type checking time (see Comparison of type checkers)
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 botocore.BaseClient for s3 service
# no wrappers and fully type annotated
s3_client = session.s3.client(region_name="us-east-1")
put_object_response = s3_client.put_object(
Bucket="bucket", Key="key", Body=b"message"
)
url = s3_client.generate_presigned_url(
"get_object", {"Bucket": "bucket", "Key": "key"},
)
# same for boto3.ServiceResource
s3_resource = session.s3.resource(region_name="us-east-1")
s3_object = resource.Bucket("bucket").put_object(Key="key", Body=b"message")
Full list of supported AWS services can be found in Supported AWS services.
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 aiobotocore.AioBaseClient for s3 service
# no wrappers and fully type annotated
async with session.s3.create_client(region_name="us-east-1") as s3_client:
put_object_response = await s3_client.put_object(
Bucket="bucket", Key="key", Body=b"message"
)
url = await s3_client.generate_presigned_url(
"get_object", {"Bucket": "bucket", "Key": "key"}
)
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 aiobotocore.AioBaseClient for s3 service
# no wrappers and fully type annotated
async with session.s3.client(region_name="us-east-1") as s3_client:
put_object_response = await s3_client.put_object(
Bucket="bucket", Key="key", Body=b"message"
)
url = await s3_client.generate_presigned_url(
"get_object", {"Bucket": "bucket", "Key": "key"}
)
# same for aioboto3.AIOBoto3ServiceResource
async with session.s3.resource(region_name="us-east-1") as s3_resource:
s3_bucket = await s3_resource.Bucket("bucket")
s3_object = await s3_bucket.put_object(Key="key", Body=b"message")
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:
- botocore-stubs - Static type annotations for
botocore - types-boto3-lite - Static type annotations for
boto3 - types-boto3-full - Generated type annotations for all AWS services
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:
- types-aioboto3-lite - Static type annotations for
aioboto3 - types-aiobotocore-lite - Static type annotations for
aiobotocore - types-aiobotocore-full - Generated type annotations for all AWS services
Versioning
boto34 version is not related to boto3 version and follows
Python Packaging version specifiers.
Latest changes
Full changelog can be found in Releases.
Metadata
Release files for boto34 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| boto34-0.1.3.tar.gz | 329.2 kB | Without provenance | Details for boto34-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| boto34-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for boto34-0.1.3-py3-none-any.whl |
Total release size: 918.7 kB
Release files / boto34-0.1.3.tar.gz
| Download URL | boto34-0.1.3.tar.gz |
|---|---|
| Size | 329.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
99b45588fd0e0ea9ea919c45243d95899f2b14bc5e0b85f6c6f93be10c8f24b4
|
|
BLAKE2b-256 checksum How to use checksums |
c0112e5d4a2538bc134f204cc69b098899f674a612c87c0509023e4dcdc29890
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.3
|
Release files / boto34-0.1.3-py3-none-any.whl
| Download URL | boto34-0.1.3-py3-none-any.whl |
|---|---|
| Size | 589.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
475497aabb6cd6e0586894c76c61749bb172594b113b1236c0a66a199c578c07
|
|
BLAKE2b-256 checksum How to use checksums |
2025c029f95905569c403ce6f9f817c67934f7c89aa9d17c11fce0e78ea564bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.3
|
Security for boto34 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.