Type annotations for boto3.CloudTrail 1.14.0 service, generated by mypy-boto3-buider 2.0.4
Project description
mypy-boto3-cloudtrail
Type annotations for boto3.CloudTrail 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 CloudTrail
service.
python -m pip install boto3-stubs[cloudtrail]
Use boto3
with mypy_boto3_cloudtrail
in your project and enjoy type checking and auto-complete.
import boto3
from mypy_boto3_cloudtrail import CloudTrailClient
# Now mypy can check if your code is valid.
client: CloudTrailClient = boto3.client("cloudtrail")
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: CloudTrailClient = session.client("cloudtrail")
# Annotated paginators are included as well
import mypy_boto3_cloudtrail.paginator as cloudtrail_paginators
list_public_keys_paginator: cloudtrail_paginators.ListPublicKeysPaginator = client.get_paginator("list_public_keys")
list_tags_paginator: cloudtrail_paginators.ListTagsPaginator = client.get_paginator("list_tags")
list_trails_paginator: cloudtrail_paginators.ListTrailsPaginator = client.get_paginator("list_trails")
lookup_events_paginator: cloudtrail_paginators.LookupEventsPaginator = client.get_paginator("lookup_events")
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_cloudtrail
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("cloudtrail")
session_client = boto3.Session().client("cloudtrail")
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-cloudtrail-1.14.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b7cb83acb9dcaa48431be8a5a342071fdbff013464fc60fa8702766079d7b39 |
|
MD5 | 9be0488e53b22471584ac7aee652647f |
|
BLAKE2b-256 | 5d19bdc1caf59f6d223a3332bf264bd73aced6fc9f64e6146e00f23153f33a88 |
Hashes for mypy_boto3_cloudtrail-1.14.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb4f6050c94f3005a8310940612a08ff7b8ada0b410445f2b79a7189b6d913ca |
|
MD5 | 5cc7cf3adeadfd0e03410765ea5f9297 |
|
BLAKE2b-256 | 1ae99f037220705a4e639efa401f3e7968e561ce9f9912c024a6efdc4b290b55 |