Type annotations for boto3.CloudWatch 1.13.24 service, generated by mypy-boto3-buider 2.0.2
Project description
mypy-boto3-cloudwatch
Type annotations for boto3.CloudWatch 1.13.24 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.0.2.
More information can be found on boto3-stubs page.
How to use
Make sure you have mypy installed and activated in your IDE.
Install boto3-stubs
for CloudWatch
service.
python -m pip install boto3-stubs[cloudwatch]
# update installed packages index for automated type discovery
python -m mypy_boto3
Use boto3
with mypy_boto3_cloudwatch
in your project and enjoy type checking and auto-complete.
import boto3
from mypy_boto3_cloudwatch import CloudWatchClient
# Now mypy can check if your code is valid.
client: CloudWatchClient = boto3.client("cloudwatch")
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: CloudWatchClient = session.client("cloudwatch")
# Do you prefer resource approach? We've got you covered!
from mypy_boto3_cloudwatch import CloudWatchServiceResource
resource: cloudwatch.CloudWatchServiceResource = boto3.resource("cloudwatch")
# Waiters are also supported
import mypy_boto3_cloudwatch.waiter as cloudwatch_waiters
alarm_exists_waiter: cloudwatch_waiters.AlarmExistsWaiter = client.get_waiter("alarm_exists")
composite_alarm_exists_waiter: cloudwatch_waiters.CompositeAlarmExistsWaiter = client.get_waiter("composite_alarm_exists")
# Annotated paginators are included as well
import mypy_boto3_cloudwatch.paginator as cloudwatch_paginators
describe_alarm_history_paginator: cloudwatch_paginators.DescribeAlarmHistoryPaginator = client.get_paginator("describe_alarm_history")
describe_alarms_paginator: cloudwatch_paginators.DescribeAlarmsPaginator = client.get_paginator("describe_alarms")
get_metric_data_paginator: cloudwatch_paginators.GetMetricDataPaginator = client.get_paginator("get_metric_data")
list_dashboards_paginator: cloudwatch_paginators.ListDashboardsPaginator = client.get_paginator("list_dashboards")
list_metrics_paginator: cloudwatch_paginators.ListMetricsPaginator = client.get_paginator("list_metrics")
Automated type discovery
mypy_boto3
package can generate index for mypy_boto3_cloudwatch
and other installed services.
# Run this command when you add or remove service packages
python -m mypy_boto3
Generated index provides overloads for boto3.client
and boto3.service
,
boto3.Session.client
and boto3.Session.resource
functions,
so explicit type annotations are not needed.
mypy
supports function overloads as expectedPyCharm
also supports function overloads, but consumes a lot of RAM, use carefullyVSCode
does not currently support function overloads
Also, generated index allows you to import types from mypy_boto3
:
# you can replace imports
import mypy_boto3_cloudwatch as cloudwatch
from mypy_boto3_cloudwatch import CloudWatchClient
# with these
from mypy_boto3 import cloudwatch
from mypy_boto3.cloudwatch import CloudWatchClient
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mypy-boto3-cloudwatch-1.13.24.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0021364ce94e37d47d808564e97bdb81587d994f91498bc1fc746c2818231f73 |
|
MD5 | ff93e36e272e8d81bd552a2946ee1661 |
|
BLAKE2b-256 | 0d1e6ef2be386070d83ea4c30b75df31f4974ee8f215531a54729a7d378b84f1 |
Hashes for mypy_boto3_cloudwatch-1.13.24.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eeb5e13a4863a7f8a0d34bb6809ca151f52bae2fb4d621a28cebb52f9fa099f8 |
|
MD5 | 042de0e6605ecbdb3e228dfb154a327e |
|
BLAKE2b-256 | 17626e77958607b3fdd728add13d616cdf18f3a7a83de2d155b066af137e8584 |