Skip to main content

Type annotations for boto3.CloudHSMV2 1.14.33 service, generated by mypy-boto3-buider 2.2.0

Project description

mypy-boto3-cloudhsmv2

PyPI - mypy-boto3-cloudhsmv2 PyPI - Python Version Docs

Type annotations for boto3.CloudHSMV2 1.14.33 service compatible with mypy, VSCode, PyCharm and other tools.

Generated by mypy-boto3-buider 2.2.0.

More information can be found on boto3-stubs page.

How to install

Make sure you have mypy installed and activated in your IDE.

Install boto3-stubs for CloudHSMV2 service.

python -m pip install boto3-stubs[cloudhsmv2]

How to use

Client annotations

CloudHSMV2Client provides annotations for boto3.client("cloudhsmv2").

import boto3

from mypy_boto3_cloudhsmv2 import CloudHSMV2Client
from mypy_boto3_cloudhsmv2.paginator import (
    DescribeBackupsPaginator,
    DescribeClustersPaginator,
    ListTagsPaginator,
)
from mypy_boto3_cloudhsmv2.type_defs import BackupTypeDef, ...

client: CloudHSMV2Client = boto3.client("cloudhsmv2")

# now client usage is checked by mypy and IDE should provide code auto-complete

# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: CloudHSMV2Client = session.client("cloudhsmv2")

Paginators annotations

mypy_boto3_cloudhsmv2.paginator module contains type annotations for all paginators.

client: CloudHSMV2Client = boto3.client("cloudhsmv2")

# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
describe_backups_paginator: DescribeBackupsPaginator = client.get_paginator("describe_backups")
describe_clusters_paginator: DescribeClustersPaginator = client.get_paginator("describe_clusters")
list_tags_paginator: ListTagsPaginator = client.get_paginator("list_tags")

Typed dictionations

mypy_boto3_cloudhsmv2.type_defs module contains structures and shapes assembled to typed dictionaries for additional type checking.

def get_structure() -> BackupTypeDef:
    return {
      ...
    }

Dynamic type annotations

mypy_boto3 command generates boto3.client/resource type annotations for mypy_boto3_cloudhsmv2 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 expected
  • PyCharm also supports function overloads, but consumes a lot of RAM, use carefully if you have many services installed
  • VSCode does not currently support function overloads, use explicit type annotations
# Type is discovered correctly by mypy and PyCharm
# VSCode still needs explicit type annotations
client = boto3.client("cloudhsmv2")

session_client = boto3.Session().client("cloudhsmv2")

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

mypy-boto3-cloudhsmv2-1.14.33.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

mypy_boto3_cloudhsmv2-1.14.33.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file mypy-boto3-cloudhsmv2-1.14.33.0.tar.gz.

File metadata

  • Download URL: mypy-boto3-cloudhsmv2-1.14.33.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5

File hashes

Hashes for mypy-boto3-cloudhsmv2-1.14.33.0.tar.gz
Algorithm Hash digest
SHA256 5622f386a76b2691acfbda9449b9d752e72a3efc97aa0693a6d76933e8af65f6
MD5 8f02f18e30fce01c968fd61aeaf0ea3f
BLAKE2b-256 bbf5d715d5a4057711a62e8b10a1c8ed437f549d1ece39bf0543f890b1a5ed6a

See more details on using hashes here.

File details

Details for the file mypy_boto3_cloudhsmv2-1.14.33.0-py3-none-any.whl.

File metadata

  • Download URL: mypy_boto3_cloudhsmv2-1.14.33.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5

File hashes

Hashes for mypy_boto3_cloudhsmv2-1.14.33.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c0f422c5f8eb652cd698a0aa0fb37c135101dfba63dc8a025ad9173b08dbc51
MD5 481cb3d185d9e159fe4d3bc5b73eee21
BLAKE2b-256 8677b29aeb0823189b53252e2842f1d36af407bd01daf457e412b2b386244b6b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page