Giter Site home page Giter Site logo

nyimbi / mturk-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ctrlcctrlv/mturk-python

0.0 3.0 0.0 173 KB

Complete Mechanical Turk API written in Python that uses the same names as the official documentation

License: Other

Python 100.00%

mturk-python's Introduction

mturk-python

Complete Mechanical Turk API written in Python that uses the same names as the official documentation

mturk.py is a small library that sends requests to Mechanical Turk. It is much simpler than other libraries which redefine every function that Mechanical Turk recognizes. This saves you time so you don't have to worry about the library, just the Mechanical Turk API.

Read the official mTurk API docs here.

Your configuration file, passed as a dict to MechanicalTurk or saved in mturkconfig.json

stdout_log enables the requests log of each request made to mTurk. verify_mturk_ssl verifies mTurk's SSL certificate. This should be left true in most cases, but according to bug reports it's broken on some operating systems.

{
"use_sandbox" : false,
"stdout_log" : false,
"verify_mturk_ssl" : true,
"aws_key" : "ACCESSID",
"aws_secret_key" : "PASSWORD"
}

Getting your balance

import mturk
m = mturk.MechanicalTurk()
r = m.request("GetAccountBalance")
if r.valid:
    print r.get_response_element("AvailableBalance")

Assigning a qualification

import mturk
m = mturk.MechanicalTurk()
workers = ["A1ZZZ","A1QQQ"] # Replace these, of course!
for worker in workers:
    m.request("AssignQualification",
                {"QualificationTypeId":"2MYQUALIFICATION",
                 "WorkerId":worker, "IntegerValue":100})

If you find any bugs please open a new issue.

mturk-python's People

Contributors

ctrlcctrlv avatar

Watchers

James Cloos avatar Nyimbi Odero avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.