Type annotations for boto3.ServiceQuotas 1.14.0 service, generated by mypy-boto3-buider 2.1.0
Project description
mypy-boto3-service-quotas
Type annotations for boto3.ServiceQuotas 1.14.0 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.1.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 ServiceQuotas
service.
python -m pip install boto3-stubs[service-quotas]
How to use
Client annotations
ServiceQuotasClient
provides annotations for boto3.client("service-quotas")
.
import boto3
from mypy_boto3_service_quotas import ServiceQuotasClient
client: ServiceQuotasClient = boto3.client("service-quotas")
# 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: ServiceQuotasClient = session.client("service-quotas")
Paginators annotations
mypy_boto3_service_quotas.paginator
module contains type annotations for all paginators.
from mypy_boto3_service_quotas import ServiceQuotasClient
from mypy_boto3_service_quotas.paginator import (
ListAWSDefaultServiceQuotasPaginator,
ListRequestedServiceQuotaChangeHistoryPaginator,
ListRequestedServiceQuotaChangeHistoryByQuotaPaginator,
ListServiceQuotaIncreaseRequestsInTemplatePaginator,
ListServiceQuotasPaginator,
ListServicesPaginator,
)
client: ServiceQuotasClient = boto3.client("service-quotas")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
list_aws_default_service_quotas_paginator: ListAWSDefaultServiceQuotasPaginator = client.get_paginator("list_aws_default_service_quotas")
list_requested_service_quota_change_history_paginator: ListRequestedServiceQuotaChangeHistoryPaginator = client.get_paginator("list_requested_service_quota_change_history")
list_requested_service_quota_change_history_by_quota_paginator: ListRequestedServiceQuotaChangeHistoryByQuotaPaginator = client.get_paginator("list_requested_service_quota_change_history_by_quota")
list_service_quota_increase_requests_in_template_paginator: ListServiceQuotaIncreaseRequestsInTemplatePaginator = client.get_paginator("list_service_quota_increase_requests_in_template")
list_service_quotas_paginator: ListServiceQuotasPaginator = client.get_paginator("list_service_quotas")
list_services_paginator: ListServicesPaginator = client.get_paginator("list_services")
Typed dictionations
mypy_boto3_service_quotas.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
from mypy_boto3_service_quotas.type_defs import ErrorReasonTypeDef, ...
def get_structure() -> ErrorReasonTypeDef:
return {
...
}
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_service_quotas
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("service-quotas")
session_client = boto3.Session().client("service-quotas")
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-service-quotas-1.14.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebff4d850b85194237dba57351384b09a2f299c722dfc993f9ac6ca72feb43bc |
|
MD5 | 0312a4e13551f5bd1ebe5a3066635868 |
|
BLAKE2b-256 | bba069c22828555bd4b08b864ea2ac990077ec3ae8312968728cd6535e8fd2df |
Hashes for mypy_boto3_service_quotas-1.14.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fac923c89a0667ed5cf1047bd26e1d644c1a79ffb4c083b240ec2b83e24ec25 |
|
MD5 | 9e4c986dd9ddc152d4aafaad13dec095 |
|
BLAKE2b-256 | 5b4fad7f425f6e15635b38e713f086b09cc9e8e8184c34561ae884c07bb9d0f7 |