Skip to content

MTurkClient#

Index > MTurk > MTurkClient

Auto-generated documentation for MTurk type annotations stubs module mypy-boto3-mturk.

MTurkClient#

Type annotations and code completion for boto3.client("mturk"). boto3 documentation

# MTurkClient usage example

from boto3.session import Session
from mypy_boto3_mturk.client import MTurkClient

def get_mturk_client() -> MTurkClient:
    return Session().client("mturk")

Exceptions#

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("mturk").exceptions structure.

# Exceptions.exceptions usage example

client = boto3.client("mturk")

try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.RequestError,
    client.exceptions.ServiceFault,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_mturk.client import Exceptions

def handle_error(exc: Exceptions.ClientError) -> None:
    ...

Methods#

accept_qualification_request#

The AcceptQualificationRequest operation approves a Worker's request for a Qualification.

Type annotations and code completion for boto3.client("mturk").accept_qualification_request method. boto3 documentation

# accept_qualification_request method definition

def accept_qualification_request(
    self,
    *,
    QualificationRequestId: str,
    IntegerValue: int = ...,
) -> Dict[str, Any]:
    ...
# accept_qualification_request method usage example with argument unpacking

kwargs: AcceptQualificationRequestRequestRequestTypeDef = {  # (1)
    "QualificationRequestId": ...,
}

parent.accept_qualification_request(**kwargs)
  1. See AcceptQualificationRequestRequestRequestTypeDef

approve_assignment#

The ApproveAssignment operation approves the results of a completed assignment.

Type annotations and code completion for boto3.client("mturk").approve_assignment method. boto3 documentation

# approve_assignment method definition

def approve_assignment(
    self,
    *,
    AssignmentId: str,
    RequesterFeedback: str = ...,
    OverrideRejection: bool = ...,
) -> Dict[str, Any]:
    ...
# approve_assignment method usage example with argument unpacking

kwargs: ApproveAssignmentRequestRequestTypeDef = {  # (1)
    "AssignmentId": ...,
}

parent.approve_assignment(**kwargs)
  1. See ApproveAssignmentRequestRequestTypeDef

associate_qualification_with_worker#

The AssociateQualificationWithWorker operation gives a Worker a Qualification.

Type annotations and code completion for boto3.client("mturk").associate_qualification_with_worker method. boto3 documentation

# associate_qualification_with_worker method definition

def associate_qualification_with_worker(
    self,
    *,
    QualificationTypeId: str,
    WorkerId: str,
    IntegerValue: int = ...,
    SendNotification: bool = ...,
) -> Dict[str, Any]:
    ...
# associate_qualification_with_worker method usage example with argument unpacking

kwargs: AssociateQualificationWithWorkerRequestRequestTypeDef = {  # (1)
    "QualificationTypeId": ...,
    "WorkerId": ...,
}

parent.associate_qualification_with_worker(**kwargs)
  1. See AssociateQualificationWithWorkerRequestRequestTypeDef

can_paginate#

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("mturk").can_paginate method. boto3 documentation

# can_paginate method definition

def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close#

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("mturk").close method. boto3 documentation

# close method definition

def close(
    self,
) -> None:
    ...

create_additional_assignments_for_hit#

The CreateAdditionalAssignmentsForHIT operation increases the maximum number of assignments of an existing HIT.

Type annotations and code completion for boto3.client("mturk").create_additional_assignments_for_hit method. boto3 documentation

# create_additional_assignments_for_hit method definition

def create_additional_assignments_for_hit(
    self,
    *,
    HITId: str,
    NumberOfAdditionalAssignments: int,
    UniqueRequestToken: str = ...,
) -> Dict[str, Any]:
    ...
# create_additional_assignments_for_hit method usage example with argument unpacking

kwargs: CreateAdditionalAssignmentsForHITRequestRequestTypeDef = {  # (1)
    "HITId": ...,
    "NumberOfAdditionalAssignments": ...,
}

parent.create_additional_assignments_for_hit(**kwargs)
  1. See CreateAdditionalAssignmentsForHITRequestRequestTypeDef

create_hit#

The CreateHIT operation creates a new Human Intelligence Task (HIT).

Type annotations and code completion for boto3.client("mturk").create_hit method. boto3 documentation

# create_hit method definition

def create_hit(
    self,
    *,
    LifetimeInSeconds: int,
    AssignmentDurationInSeconds: int,
    Reward: str,
    Title: str,
    Description: str,
    MaxAssignments: int = ...,
    AutoApprovalDelayInSeconds: int = ...,
    Keywords: str = ...,
    Question: str = ...,
    RequesterAnnotation: str = ...,
    QualificationRequirements: Sequence[Union[QualificationRequirementTypeDef, QualificationRequirementExtraOutputTypeDef]] = ...,  # (1)
    UniqueRequestToken: str = ...,
    AssignmentReviewPolicy: Union[ReviewPolicyTypeDef, ReviewPolicyOutputTypeDef] = ...,  # (2)
    HITReviewPolicy: Union[ReviewPolicyTypeDef, ReviewPolicyOutputTypeDef] = ...,  # (2)
    HITLayoutId: str = ...,
    HITLayoutParameters: Sequence[HITLayoutParameterTypeDef] = ...,  # (4)
) -> CreateHITResponseTypeDef:  # (5)
    ...
  1. See QualificationRequirementTypeDef QualificationRequirementExtraOutputTypeDef
  2. See ReviewPolicyTypeDef ReviewPolicyOutputTypeDef
  3. See ReviewPolicyTypeDef ReviewPolicyOutputTypeDef
  4. See HITLayoutParameterTypeDef
  5. See CreateHITResponseTypeDef
# create_hit method usage example with argument unpacking

kwargs: CreateHITRequestRequestTypeDef = {  # (1)
    "LifetimeInSeconds": ...,
    "AssignmentDurationInSeconds": ...,
    "Reward": ...,
    "Title": ...,
    "Description": ...,
}

parent.create_hit(**kwargs)
  1. See CreateHITRequestRequestTypeDef

create_hit_type#

The CreateHITType operation creates a new HIT type.

Type annotations and code completion for boto3.client("mturk").create_hit_type method. boto3 documentation

# create_hit_type method definition

def create_hit_type(
    self,
    *,
    AssignmentDurationInSeconds: int,
    Reward: str,
    Title: str,
    Description: str,
    AutoApprovalDelayInSeconds: int = ...,
    Keywords: str = ...,
    QualificationRequirements: Sequence[Union[QualificationRequirementTypeDef, QualificationRequirementExtraOutputTypeDef]] = ...,  # (1)
) -> CreateHITTypeResponseTypeDef:  # (2)
    ...
  1. See QualificationRequirementTypeDef QualificationRequirementExtraOutputTypeDef
  2. See CreateHITTypeResponseTypeDef
# create_hit_type method usage example with argument unpacking

kwargs: CreateHITTypeRequestRequestTypeDef = {  # (1)
    "AssignmentDurationInSeconds": ...,
    "Reward": ...,
    "Title": ...,
    "Description": ...,
}

parent.create_hit_type(**kwargs)
  1. See CreateHITTypeRequestRequestTypeDef

create_hit_with_hit_type#

The CreateHITWithHITType operation creates a new Human Intelligence Task (HIT) using an existing HITTypeID generated by the CreateHITType operation.

Type annotations and code completion for boto3.client("mturk").create_hit_with_hit_type method. boto3 documentation

# create_hit_with_hit_type method definition

def create_hit_with_hit_type(
    self,
    *,
    HITTypeId: str,
    LifetimeInSeconds: int,
    MaxAssignments: int = ...,
    Question: str = ...,
    RequesterAnnotation: str = ...,
    UniqueRequestToken: str = ...,
    AssignmentReviewPolicy: Union[ReviewPolicyTypeDef, ReviewPolicyOutputTypeDef] = ...,  # (1)
    HITReviewPolicy: Union[ReviewPolicyTypeDef, ReviewPolicyOutputTypeDef] = ...,  # (1)
    HITLayoutId: str = ...,
    HITLayoutParameters: Sequence[HITLayoutParameterTypeDef] = ...,  # (3)
) -> CreateHITWithHITTypeResponseTypeDef:  # (4)
    ...
  1. See ReviewPolicyTypeDef ReviewPolicyOutputTypeDef
  2. See ReviewPolicyTypeDef ReviewPolicyOutputTypeDef
  3. See HITLayoutParameterTypeDef
  4. See CreateHITWithHITTypeResponseTypeDef
# create_hit_with_hit_type method usage example with argument unpacking

kwargs: CreateHITWithHITTypeRequestRequestTypeDef = {  # (1)
    "HITTypeId": ...,
    "LifetimeInSeconds": ...,
}

parent.create_hit_with_hit_type(**kwargs)
  1. See CreateHITWithHITTypeRequestRequestTypeDef

create_qualification_type#

The CreateQualificationType operation creates a new Qualification type, which is represented by a QualificationType data structure.

Type annotations and code completion for boto3.client("mturk").create_qualification_type method. boto3 documentation

# create_qualification_type method definition

def create_qualification_type(
    self,
    *,
    Name: str,
    Description: str,
    QualificationTypeStatus: QualificationTypeStatusType,  # (1)
    Keywords: str = ...,
    RetryDelayInSeconds: int = ...,
    Test: str = ...,
    AnswerKey: str = ...,
    TestDurationInSeconds: int = ...,
    AutoGranted: bool = ...,
    AutoGrantedValue: int = ...,
) -> CreateQualificationTypeResponseTypeDef:  # (2)
    ...
  1. See QualificationTypeStatusType
  2. See CreateQualificationTypeResponseTypeDef
# create_qualification_type method usage example with argument unpacking

kwargs: CreateQualificationTypeRequestRequestTypeDef = {  # (1)
    "Name": ...,
    "Description": ...,
    "QualificationTypeStatus": ...,
}

parent.create_qualification_type(**kwargs)
  1. See CreateQualificationTypeRequestRequestTypeDef

create_worker_block#

The CreateWorkerBlock operation allows you to prevent a Worker from working on your HITs.

Type annotations and code completion for boto3.client("mturk").create_worker_block method.