Skip to main content

Crowdflower API - Python Client

Project description

Minimal client library for interacting with the CrowdFlower API with Python.

Installation

Install from PyPI:

easy_install crowdflower

Or install the latest version GitHub:

git clone https://github.com/chbrown/crowdflower.git
cd crowdflower
python setup.py develop

Example use

Import:

import crowdflower

CrowdFlower API keys are 20 characters long; the one below is just random characters.

conn = crowdflower.Connection('LbcxvIlE3x1M8F6TT5hN')

This library will default to an environment variable called CROWDFLOWER_API_KEY if none is specified here:

conn = crowdflower.Connection()

Loop through all your jobs and print the titles:

for job in conn.jobs():
    print job['title']

Create a new job with some new units:

job = conn.upload(data)
print job

Fancy stuff

Run a bunch of DELETE calls on each item in the job.

for delete_response in job.clear_units():
    print delete_response

If you don’t want to print the responses, you still need to exhaust the loop:

list(job.clear_units())

License

Copyright © 2014 Christopher Brown. MIT Licensed.

Project details


Release history Release notifications

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

History Node

0.0.12

History Node

0.0.11

History Node

0.0.10

History Node

0.0.9

History Node

0.0.8

History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

This version
History Node

0.0.4

History Node

0.0.3

History Node

0.0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
crowdflower-0.0.4.tar.gz (6.6 kB) Copy SHA256 hash SHA256 Source None Jun 9, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page