turkleton package¶
Subpackages¶
Submodules¶
turkleton.connection module¶
mturk.connection¶
Simplified interface for connecting to Mechanical Turk.
-
exception
turkleton.connection.ConnectionError[source]¶ Bases:
turkleton.errors.ErrorError involving the connection to Mechanical Turk
-
turkleton.connection.get_connection()[source]¶ Return the Mechanical Turk connection for this process.
Return type: boto.mturk.connection.MTurkConnection
-
turkleton.connection.set_connection(boto_connection)[source]¶ Set the Mechanical Turk connection for this process.
Parameters: boto_connection (boto.mturk.connection.MTurkConnection) – A connection
-
turkleton.connection.setup(access_key_id, secret_access_key, host=None)[source]¶ Setup the global connection to Mechanical Turk.
Parameters: - access_key_id (str or unicode) – The access key id
- secret_access_key (str or unicode) – The access secret key
- host (str or unicode) – (Optional, default is production MTurk) The host to connect to
Return type: boto.mturk.connection.Connection
-
turkleton.connection.setup_sandbox(access_key_id, secret_access_key)[source]¶ Setup a global connection to the Mechanical Turk sandbox.
Parameters: - access_key_id (str or unicode) – The access key id
- secret_access_key (str or unicode) – The access secret key
Return type: boto.mturk.connection.Connection