Type annotations for boto3.CloudWatch 1.13.26 service, generated by mypy-boto3-buider 2.0.3
Project description
mypy-boto3-cloudwatch
Type annotations for boto3.CloudWatch 1.13.26 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.0.3.
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.26.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d733d4dac678800954aec1b7260a24117d25c51a2d267a5bad818fb8715c35e0 |
|
MD5 | df992e6c8608d5efaa4421afd08f5d8a |
|
BLAKE2b-256 | 396f468fabd6892a3a6a8b4b1ae5d77369fccd24f36e1a721987c28b11f43bed |
Hashes for mypy_boto3_cloudwatch-1.13.26.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a2c677cd7884612f4f9f62f5098fbd7bf77e6ee470fa2ceff0afd78832fe6a0 |
|
MD5 | 308f803643fe4043360ca33671d0bf66 |
|
BLAKE2b-256 | f78458adbaca4dab40ac8f20230c4820d373b2a8179b61a186cabb8f5e0b6dad |