Type annotations for boto3.CloudWatch 1.13.25 service, generated by mypy-boto3-buider 2.0.2
Project description
mypy-boto3-cloudwatch
Type annotations for boto3.CloudWatch 1.13.25 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.25.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90f1f42474c77fe31c64b2e37483afe3d8aff79ba9a5fe33ece58a4725eee9e6 |
|
MD5 | c024c41b56089adc28e501148d20e3b1 |
|
BLAKE2b-256 | cbf8b978f68153ab2bb8330a96321192ed6277981ac90c4dd1b0596e989a7bcc |
Hashes for mypy_boto3_cloudwatch-1.13.25.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7496ed559935e35e6c6530d8c49bbe27f33b6ef1dbca41b90cfb3e4a0b0062c |
|
MD5 | 9ee8072437915327f295980930ce05d7 |
|
BLAKE2b-256 | ee8998a33e96b43ae65df40e5716ece3f1bdaacd63b6cbd6a7291cbdb3e5b518 |