Type annotations for boto3.MTurk 1.14.24 service, generated by mypy-boto3-buider 2.2.0
Project description
mypy-boto3-mturk
Type annotations for boto3.MTurk 1.14.24 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.24.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78fd9f11e6975f8efe091dee3821c5795d75038f935952a26dfb8ad85aaaa1e1 |
|
MD5 | 17af321bc75a6b20d3750ba20384b01c |
|
BLAKE2b-256 | 187c7075813b60d67fb635f11d3d2914371c765e6368004e309b420e4e45c72d |
Hashes for mypy_boto3_mturk-1.14.24.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d01ca05d5354fd711fc6927802fd97f9fdbab2995bd8f49f0f2f2be7eb4c2b8b |
|
MD5 | 2fe47271f9d31e08d5b49140b5bb8481 |
|
BLAKE2b-256 | 89428ac7fc20fe697e2d0105cedf21a5f591d3cce4270d0e6362956d95bc6759 |