Type annotations for boto3.MTurk 1.14.37 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-mturk
Type annotations for boto3.MTurk 1.14.37 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.37.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f4627234495768c2a5fae00032de76733794d74fe281f59b308e91d0170c8b1 |
|
MD5 | af88eeeb8e4e049f81cf745581732ed9 |
|
BLAKE2b-256 | 7736966a12356a16097ac6fa01970f87658b498a49bcd682083016146e590421 |
Hashes for mypy_boto3_mturk-1.14.37.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e16235a0d7a4c20cbc3576055325bbf915f19a2aaf50dc7f338c3ad5d3d18099 |
|
MD5 | ea9cd001536a19d1e32678431fc3a09b |
|
BLAKE2b-256 | da3f3ab7bb3897ff9946001129858d3ec034e3ca629eda3ead913b69a1b376a5 |