Type annotations for boto3.MTurk 1.14.44 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-mturk
Type annotations for boto3.MTurk 1.14.44 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 MTurk
service.
python -m pip install boto3-stubs[mturk]
How to use
Client annotations
MTurkClient
provides annotations for boto3.client("mturk")
.
import boto3
from mypy_boto3_mturk import MTurkClient
from mypy_boto3_mturk.paginator import (
ListAssignmentsForHITPaginator,
ListBonusPaymentsPaginator,
ListHITsForQualificationTypePaginator,
ListHITsPaginator,
ListQualificationRequestsPaginator,
ListQualificationTypesPaginator,
ListReviewableHITsPaginator,
ListWorkerBlocksPaginator,
ListWorkersWithQualificationTypePaginator,
)
from mypy_boto3_mturk.type_defs import AssignmentTypeDef, ...
client: MTurkClient = boto3.client("mturk")
# 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: MTurkClient = session.client("mturk")
Paginators annotations
mypy_boto3_mturk.paginator
module contains type annotations for all paginators.
client: MTurkClient = boto3.client("mturk")
# Explicit type annotations are optional here
# Type should be correctly discovered by mypy and IDEs
# VSCode requires explicit type annotations
list_assignments_for_hit_paginator: ListAssignmentsForHITPaginator = client.get_paginator("list_assignments_for_hit")
list_bonus_payments_paginator: ListBonusPaymentsPaginator = client.get_paginator("list_bonus_payments")
list_hits_paginator: ListHITsPaginator = client.get_paginator("list_hits")
list_hits_for_qualification_type_paginator: ListHITsForQualificationTypePaginator = client.get_paginator("list_hits_for_qualification_type")
list_qualification_requests_paginator: ListQualificationRequestsPaginator = client.get_paginator("list_qualification_requests")
list_qualification_types_paginator: ListQualificationTypesPaginator = client.get_paginator("list_qualification_types")
list_reviewable_hits_paginator: ListReviewableHITsPaginator = client.get_paginator("list_reviewable_hits")
list_worker_blocks_paginator: ListWorkerBlocksPaginator = client.get_paginator("list_worker_blocks")
list_workers_with_qualification_type_paginator: ListWorkersWithQualificationTypePaginator = client.get_paginator("list_workers_with_qualification_type")
Typed dictionations
mypy_boto3_mturk.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
def get_structure() -> AssignmentTypeDef:
return {
...
}
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_mturk
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("mturk")
session_client = boto3.Session().client("mturk")
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-mturk-1.14.44.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25f938ceb35f1b7b282722ca3d00245ea1573398dcdce79e12fe504a2e76a3d4 |
|
MD5 | 7fb11c2af2282e5dca4931086c5d2fd0 |
|
BLAKE2b-256 | 1fbe4274fe7a6b0e833a1f08dac4945722cbd2dfd52f029455a2cd46bacc3a6c |
Hashes for mypy_boto3_mturk-1.14.44.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e61ae01a4c0c9c444d1b9bbd23ca2c732b21a8ec0aaec9b96748e937f76d7bd7 |
|
MD5 | 9f51cbef1b9a418a9ed384fcb2ccda20 |
|
BLAKE2b-256 | 9b0da085b8fbfcd7e63bcd6b65f0717abba9569bef060957df9bd02ac7c935f2 |