Skip to main content

Handy helpers to make botocore easier to use

Project description

bchelpers
=========

Handy helpers to make botocore easier to use.

I find myself wanting to use botocore quite often because its very simple
and pared down and it's also always current with AWS functionality. And
because Python 3.x.

That's great. But it is pretty low-level and kind of awkward to use.
The long-term fix for that is boto3 but in the mean time I've created
a few helpers to make things a bit easier.

Using bchelpers
---------------

A simple use would be like this:

from bchelpers.region import Region

region = Region(region_name='us-west-2', profile='dev')
ec2 = region.get_service_endpoint('ec2')
instances = ec2.call('describe-instances',
query='Reservations[*].Instances[*]')

The variable `instances` would now be a list of dictionaries, each containing
the full data for each instance running in this account in this region.

Note the ability to pass a
[jmespath](https://github.com/boto/jmespath) query in the call. This
query will be run against the raw data from the response so you can
easily tailor the output to include exactly what you want and only
what you want. Check out the `jmespath` link for full details on all of
the awesome things you can do with it.

I'll probably add more stuff to this over time but I fully expect this to
just go away eventually and be replaced with boto3.

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

bchelpers-0.1.0.tar.gz (7.6 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: bchelpers-0.1.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bchelpers-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1c8d82a71edd3f8ad3e71dde796d124688b16dd9cdf664cd8f79429dbb9029b9
MD5 af8f8e41318ed256c6ee9d539cb9492d
BLAKE2b-256 c81d75baad6ea0a352b4bd65a67e271077d8cdf182b2c4d4b59abc204d3828b7

See more details on using hashes here.

Supported by

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