Type annotations for boto3.MTurk 1.14.10 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-mturk
Type annotations for boto3.MTurk 1.14.10 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.10.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 396ada0b1f5c56b31bf62f4288f47508c75bdcc52a0b4ac538e595fba204463b |
|
MD5 | 58430d927e48340700ac6022296e1b24 |
|
BLAKE2b-256 | 1c0d886b00880b5c23e1c239bbc0274794d01d66f02d7b5d4a0365f60ac8e322 |
Hashes for mypy_boto3_mturk-1.14.10.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e446c52cdeaa2e684c5b81c0826f9e03206e1174ae0b1bf8c5c03c85a05c6790 |
|
MD5 | 6d0358dfa2d069208c3a75fa1cc5ab71 |
|
BLAKE2b-256 | 68c05647cfc798a82328f4cb87839f9eb73966dab7970a988a5db2e444c88990 |