Skip to content

Commit

Permalink
Merge pull request #5 from openwurl/version-1.1.0
Browse files Browse the repository at this point in the history
Version 1.1.0
  • Loading branch information
bbayles authored Sep 19, 2022
2 parents a5c8886 + 840d419 commit 8d56372
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
9 changes: 5 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
boto3-helpers
=============

This is the documentation for the ``boto3_helpers`` package, a Python library that
aims to provide a smoother interface for some of the functions in the AWS
`boto3 <https://github.com/boto/boto3>`_ package.
``boto3_helpers`` is a Python library that aims to provide a smoother interface for
some of the functions in the AWS `boto3 <https://github.com/boto/boto3>`_ package.

You know how to install it:

Expand Down Expand Up @@ -63,5 +62,7 @@ This package provides helper functions for several similar actions in AWS, such
* Paging through S3 listings
* Updating items in DynamoDB
* Assuming roles with STS
* Sending and deleting messages with SQS
* Pulling metric data from CloudWatch

See the `full documentation <https://boto3-helpers.readthedocs.io>`_.
See the `latest docs <https://boto3-helpers.readthedocs.io>`_ for more.
8 changes: 4 additions & 4 deletions boto3_helpers/cloudwatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@ def yield_metric_data(
.. code-block:: python
from boto3_helpers.cloudwatch import yield_metric_data
from datetime import datetime, timezone
from boto3_helpers.cloudwatch import yield_metric_data
for dt, value in yield_metric_data(
'AWS/S3',
'NumberOfObjects',
{'StorageType': 'AllStorageTypes', 'BucketName': 'example-bucket'},
86400,
'Maximum',
datetime.now(2022, 9, 1, 0, 0, 0, timezone.utc),
datetime.now(2022, 9, 16, 0, 0, 0, timezone.utc),
datetime(2022, 9, 1, 0, 0, 0, timezone.utc),
datetime(2022, 9, 16, 0, 0, 0, timezone.utc),
):
print(dt.isoformat(), value, sep='\t')
print(dt.isoformat(), value, sep=' ')
This function is designed to simplify the common case of pulling all data for a
single metric, which is cumbersome with the normal CloudWatch ``get_metric_data``
Expand Down
6 changes: 3 additions & 3 deletions boto3_helpers/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def describe_rule_with_targets(*, events_client=None, **kwargs):
rule_data['Arn'],
rule_data['ScheduleExpression'],
target['Arn'],
sep='\t'
sep=' '
)
.. note::
Expand Down Expand Up @@ -98,7 +98,7 @@ def yield_rules_by_target(*, events_client=None, **kwargs):
rule_data['Arn'],
rule_data['ScheduleExpression'],
len(rule_data['Targets']),
sep='\t'
sep=' '
)
.. note::
Expand Down Expand Up @@ -152,7 +152,7 @@ def yield_rules_with_targets(*, events_client=None, **kwargs):
rule_data['Name'],
rule_data['ScheduleExpression'],
len(rule_data['Targets']),
sep='\t'
sep=' '
)
.. note::
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = boto3-helpers
version = 1.0.0
version = 1.1.0
description = Helper utilities for boto3
long_description = file: README.rst
long_description_content_type = text/x-rst
Expand Down

0 comments on commit 8d56372

Please sign in to comment.