Skip to content

Instantly share code, notes, and snippets.

View adbharadwaj's full-sized avatar

Aditya Bharadwaj adbharadwaj

View GitHub Profile
@ktuite
ktuite / mturk_boto_intro.py
Last active August 19, 2020 07:06
Super simple python script that uses boto to connect to amazon mturk. If you use the sandbox, you'll see a balance of $10,000! Otherwise, you'll see your normal balance.
import boto.mturk.connection
sandbox_host = 'mechanicalturk.sandbox.amazonaws.com'
real_host = 'mechanicalturk.amazonaws.com'
mturk = boto.mturk.connection.MTurkConnection(
aws_access_key_id = 'XXX',
aws_secret_access_key = 'XXX',
host = sandbox_host,
debug = 1 # debug = 2 prints out all requests. but we'll just keep it at 1