Create a gist now

Instantly share code, notes, and snippets.

make a mechanical turk job with boto
import boto.mturk
import boto.mturk.connection
import boto.mturk.price
from boto.mturk.question import *
import sys
question = QuestionForm([
Question(
identifier=1,
content=QuestionContent([
SimpleField("Text", "what's that blue thing doing here?")
]),
answer_spec=AnswerSpecification(FreeTextAnswer())
)
])
print question.get_as_xml()
mturk = boto.mturk.connection.MTurkConnection(
aws_access_key_id='<your access key idea>',
aws_secret_access_key='<your secret access key>',
host='mechanicalturk.sandbox.amazonaws.com'
)
rs = mturk.create_hit(
question=question,
title='fingertips',
description='This is a test thing',
reward=boto.mturk.price.Price(0.01),
max_assignments=100,
duration=60
)
for hit in rs:
print hit
print hit.HITId
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment