Skip to main content

What is this?

This is a util package to help making boto3 more enjoyable.

Below is a list of the use cases:

client

instead of doing:

import boto3

client = boto3.client('cloudformation')

You can do

import betterboto

with betterboto.ClientContextManager('cloudformation') as client:
    client.create_stack

Instead of doing:

import boto3 

role_arn = 'arn:aws:iam::123456789010:role/super-role'
role_session_name = 'super-role'

sts = boto3.client('sts')
assumed_role_object = sts.assume_role(
    RoleArn=role_arn,
    RoleSessionName=role_session_name,
)
credentials = assumed_role_object['Credentials']
kwargs = {
    "aws_access_key_id": credentials['AccessKeyId'],
    "aws_secret_access_key": credentials['SecretAccessKey'],
    "aws_session_token": credentials['SessionToken'],
}
client = boto3.client(
    'cloudformation',
    aws_access_key_id=credentials['AccessKeyId'],
    aws_secret_access_key=credentials['SecretAccessKey'],
    aws_session_token=credentials['SessionToken'],
)

You can do

import betterboto

with betterboto.CrossAccountClientContextManager('cloudformation', 'arn:aws:iam::123456789010:role/super-role', 'super-role') as client:
    client.create_stack

cloudformation

instead of

Metadata

Release files for better-boto 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for better-boto 0.0.1
File Size Uploaded Provenance Actions
better-boto-0.0.1.tar.gz 2.2 kB Without provenance Details for better-boto-0.0.1.tar.gz

Release files / better-boto-0.0.1.tar.gz

Download URL better-boto-0.0.1.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
da7d5756f8ad5f248070815adfc7f8b3389d16e91134e017383afb449cacec5f
BLAKE2b-256 checksum
How to use checksums
c20d232b330c5b5b3af95a012c4a58ebd2d74f4f841a0fca0f8d0038621a4a54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

Security for better-boto 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page