Skip to main content

Type annotations for boto3.CloudHSM 1.17.70 service, generated by mypy-boto3-buider 4.12.0

Project description

mypy-boto3-cloudhsm

PyPI - mypy-boto3-cloudhsm PyPI - Python Version Docs PyPI - Downloads

boto3.typed

Type annotations for boto3.CloudHSM 1.17.70 service compatible with VSCode, PyCharm, Emacs, Sublime Text, mypy, pyright and other tools.

Generated by mypy-boto3-buider 4.12.0.

More information can be found on boto3-stubs page and in mypy-boto3-cloudhsm docs

See how it helps to find and fix potential bugs:

boto3-stubs demo

How to install

Install boto3-stubs for CloudHSM service.

python -m pip install boto3-stubs[cloudhsm]

Usage

VSCode

  • Install Python extension
  • Install Pylance extension
  • Set Pylance as your Python Language Server
  • Install boto-stubs[cloudhsm] in your environment: python -m pip install 'boto3-stubs[cloudhsm]'

Both type checking and auto-complete should work for CloudHSM service. No explicit type annotations required, write your boto3 code as usual.

PyCharm

  • Install boto-stubs[cloudhsm] in your environment: python -m pip install 'boto3-stubs[cloudhsm]'

Both type checking and auto-complete should work for CloudHSM service. No explicit type annotations required, write your boto3 code as usual. Auto-complete can be slow on big projects or if you have a lot of installed boto3-stubs submodules.

Other IDEs

Not tested, but as long as your IDE support mypy or pyright, everything should work.

mypy

  • Install mypy: python -m pip install mypy
  • Install boto-stubs[cloudhsm] in your environment: python -m pip install 'boto3-stubs[cloudhsm]'
  • Run mypy as usual

Type checking should work for CloudHSM service. No explicit type annotations required, write your boto3 code as usual.

pyright

  • Install pyright: yarn global add pyright
  • Install boto-stubs[cloudhsm] in your environment: python -m pip install 'boto3-stubs[cloudhsm]'
  • Optionally, you can install boto3-stubs to typings folder.

Type checking should work for CloudHSM service. No explicit type annotations required, write your boto3 code as usual.

Explicit type annotations

Client annotations

CloudHSMClient provides annotations for boto3.client("cloudhsm").

import boto3

from mypy_boto3_cloudhsm import CloudHSMClient

client: CloudHSMClient = boto3.client("cloudhsm")

# 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: CloudHSMClient = session.client("cloudhsm")

Paginators annotations

mypy_boto3_cloudhsm.paginator module contains type annotations for all paginators.

from mypy_boto3_cloudhsm import CloudHSMClient
from mypy_boto3_cloudhsm.paginator import (
    ListHapgsPaginator,
    ListHsmsPaginator,
    ListLunaClientsPaginator,
)

client: CloudHSMClient = boto3.client("cloudhsm")

# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
list_hapgs_paginator: ListHapgsPaginator = client.get_paginator("list_hapgs")
list_hsms_paginator: ListHsmsPaginator = client.get_paginator("list_hsms")
list_luna_clients_paginator: ListLunaClientsPaginator = client.get_paginator("list_luna_clients")

Literals

mypy_boto3_cloudhsm.literals module contains literals extracted from shapes that can be used in user code for type checking.

from mypy_boto3_cloudhsm.literals import (
    ClientVersion,
    CloudHsmObjectState,
    HsmStatus,
    ListHapgsPaginatorName,
    ListHsmsPaginatorName,
    ListLunaClientsPaginatorName,
    SubscriptionType,
)

def check_value(value: ClientVersion) -> bool:
    ...

Typed dictionaries

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

from mypy_boto3_cloudhsm.type_defs import (
    AddTagsToResourceResponseTypeDef,
    CreateHapgResponseTypeDef,
    CreateHsmResponseTypeDef,
    CreateLunaClientResponseTypeDef,
    DeleteHapgResponseTypeDef,
    DeleteHsmResponseTypeDef,
    DeleteLunaClientResponseTypeDef,
    DescribeHapgResponseTypeDef,
    DescribeHsmResponseTypeDef,
    DescribeLunaClientResponseTypeDef,
    GetConfigResponseTypeDef,
    ListAvailableZonesResponseTypeDef,
    ListHapgsResponseTypeDef,
    ListHsmsResponseTypeDef,
    ListLunaClientsResponseTypeDef,
    ListTagsForResourceResponseTypeDef,
    ModifyHapgResponseTypeDef,
    ModifyHsmResponseTypeDef,
    ModifyLunaClientResponseTypeDef,
    PaginatorConfigTypeDef,
    RemoveTagsFromResourceResponseTypeDef,
    TagTypeDef,
)

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

Versioning

mypy-boto3-cloudhsm version is the same as related boto3 version and follows PEP 440 format.

Documentation

All type annotations can be found in mypy-boto3-cloudhsm docs

Support and contributing

This package is auto-generated. Please reports any bugs or request new features in mypy-boto3-builder repository.

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.

Files for mypy-boto3-cloudhsm, version 1.17.70.post2
Filename, size File type Python version Upload date Hashes
Filename, size mypy_boto3_cloudhsm-1.17.70.post2-py3-none-any.whl (14.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size mypy-boto3-cloudhsm-1.17.70.post2.tar.gz (10.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page