Type annotations for boto3.CloudWatchLogs 1.14.0 service, generated by mypy-boto3-buider 2.0.4
Project description
mypy-boto3-logs
Type annotations for boto3.CloudWatchLogs 1.14.0 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.0.4.
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 CloudWatchLogs
service.
python -m pip install boto3-stubs[logs]
Use boto3
with mypy_boto3_logs
in your project and enjoy type checking and auto-complete.
import boto3
from mypy_boto3_logs import CloudWatchLogsClient
# Now mypy can check if your code is valid.
client: CloudWatchLogsClient = boto3.client("logs")
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: CloudWatchLogsClient = session.client("logs")
# Annotated paginators are included as well
import mypy_boto3_logs.paginator as logs_paginators
describe_destinations_paginator: logs_paginators.DescribeDestinationsPaginator = client.get_paginator("describe_destinations")
describe_export_tasks_paginator: logs_paginators.DescribeExportTasksPaginator = client.get_paginator("describe_export_tasks")
describe_log_groups_paginator: logs_paginators.DescribeLogGroupsPaginator = client.get_paginator("describe_log_groups")
describe_log_streams_paginator: logs_paginators.DescribeLogStreamsPaginator = client.get_paginator("describe_log_streams")
describe_metric_filters_paginator: logs_paginators.DescribeMetricFiltersPaginator = client.get_paginator("describe_metric_filters")
describe_queries_paginator: logs_paginators.DescribeQueriesPaginator = client.get_paginator("describe_queries")
describe_resource_policies_paginator: logs_paginators.DescribeResourcePoliciesPaginator = client.get_paginator("describe_resource_policies")
describe_subscription_filters_paginator: logs_paginators.DescribeSubscriptionFiltersPaginator = client.get_paginator("describe_subscription_filters")
filter_log_events_paginator: logs_paginators.FilterLogEventsPaginator = client.get_paginator("filter_log_events")
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_logs
and other installed services.
# Run this command after you add or remove service packages
python -m mypy_boto3
Generated type annotations provide overloads for boto3.client
and boto3.resource
,
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 carefully if you have many services installedVSCode
does not currently support function overloads, use explicit type annotations
import boto3
# Type is discovered correctly by mypy and PyCharm
# VSCode still needs explicit type annotations
client = boto3.client("logs")
session_client = boto3.Session().client("logs")
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_logs-1.14.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de036d1be855d7a0f3b3a82cf2a87ab98ffde02991795b78c90882052065a5b3 |
|
MD5 | 52e00b16a6df7871d60486ac5f88a740 |
|
BLAKE2b-256 | 68256e7b44c5c6148fbb068fdaf0a8da9a44c81ba15ff9d2b8c9fcba6b05baff |