Skip to main content

A thin wrapper around boto3

Project description

# botor
A thin wrapper around boto3

## features

- intelligent connection caching.
- handles pagination for certain client methods.
- rate limit handling, with exponential backoff.
- multi-account sts:assumerole abstraction.

## Example

# Using wrapper methods:
from botor.aws.sqs import get_queue, get_messages
conn_details = {
'account_number': '111111111111',
'assume_role': 'MyRole',
'session_name': 'MySession',
'region': 'us-east-1'
}
queue = get_queue(queue_name='MyQueue', **conn_details)
messages = get_messages(queue=queue)


# Using the botor class
from botor import Botor
Botor.go('kms.client.list_aliases', **conn_details)

botor = Botor(**conn_details)
botor.call('kms.client.list_aliases')


# directly asking for a boto3 connection:
from botor.aws.sts import boto3_cached_conn
conn = boto3_cached_conn('ec2', **conn_details)


# Over your entire environment:
from botor.decorators import iter_account_region

accounts = ['000000000000', '111111111111']

conn_details = {
'assume_role': 'MyRole',
'session_name': 'MySession',
'conn_type': 'boto3'
}

@iter_account_region('kms', accounts=accounts, regions=['us-east-1'], **conn_details)
def list_keys(conn=None):
return conn.list_keys()['Keys']

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

botor-0.0.1.dev7.tar.gz (10.6 kB view details)

Uploaded Source

File details

Details for the file botor-0.0.1.dev7.tar.gz.

File metadata

  • Download URL: botor-0.0.1.dev7.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for botor-0.0.1.dev7.tar.gz
Algorithm Hash digest
SHA256 a01d26bfb74328e7e522790df74669ee981e0cc4976a2cc891e15bcc77f4deb0
MD5 5faaa4c4dc9098b141d66639e9528575
BLAKE2b-256 327e61c12a9a7d7174492d7bde3111834be995c2eff6cd304d647c74c04f362c

See more details on using hashes here.

Supported by

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