Type annotations for boto3.MTurk 1.14.4 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-mturk
Type annotations for boto3.MTurk 1.14.4 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.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d97535673b9808ac2248dfc58e71c65540929f31306dd0f32b7bfe7ea4bb5d2b |
|
MD5 | 1534c5846052a1c6e550f1879a372d57 |
|
BLAKE2b-256 | eb2d8433c5a683651ae6312fdab6e9fd89976d636f721159bd274433bcb8070a |
Hashes for mypy_boto3_mturk-1.14.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b16e64f6a71b9e192aa442d45ef734bbaabd7373abe5d77c2b673a31867c5cf |
|
MD5 | 6e851c3a7a667bc50344afd7df791875 |
|
BLAKE2b-256 | 593a852d4e89487200e5f3674a7faa21fc849f027d6dfd7358bb2e7fd07f831f |