Type annotations for boto3.FMS 1.14.51 service, generated by mypy-boto3-buider 2.3.1
Project description
mypy-boto3-fms
Type annotations for boto3.FMS 1.14.51 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.3.1.
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 FMS
service.
python -m pip install boto3-stubs[fms]
How to use
Client annotations
FMSClient
provides annotations for boto3.client("fms")
.
import boto3
from mypy_boto3_fms import FMSClient
from mypy_boto3_fms.paginator import (
ListComplianceStatusPaginator,
ListMemberAccountsPaginator,
ListPoliciesPaginator,
)
from mypy_boto3_fms.type_defs import AppTypeDef, ...
client: FMSClient = boto3.client("fms")
# 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: FMSClient = session.client("fms")
Paginators annotations
mypy_boto3_fms.paginator
module contains type annotations for all paginators.
client: FMSClient = boto3.client("fms")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
list_compliance_status_paginator: ListComplianceStatusPaginator = client.get_paginator("list_compliance_status")
list_member_accounts_paginator: ListMemberAccountsPaginator = client.get_paginator("list_member_accounts")
list_policies_paginator: ListPoliciesPaginator = client.get_paginator("list_policies")
Typed dictionations
mypy_boto3_fms.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
def get_structure() -> AppTypeDef:
return {
...
}
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_fms
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
# Type is discovered correctly by mypy and PyCharm
# VSCode still needs explicit type annotations
client = boto3.client("fms")
session_client = boto3.Session().client("fms")
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_fms-1.14.51.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e47f672f6c57878cc0ffdfd4aa6c3f06b639f611ca09e2ec8f4bb96301497c40 |
|
MD5 | d22d8d29ea77dea485697ebce330b334 |
|
BLAKE2b-256 | 36518e034ceb35febe2feed79d1d4f4b6dded691c6be2dacbac16aab8ca0e291 |