Skip to main content

pybossa-client is a tiny Python library makes it easy to work with PyBossa.

Project description

Makes it easy to work with PyBossa

Install

You can install pybossa-client using pip, preferably while working in a virtualenv:

$ pip install pybossa-client

Usage

Setup:

import pbclient

# setup the server connection
pbclient.set('endpoint', 'http://pybossa.com')
pbclient.set('api_key', '--your-api-key-here--')

Create an application:

pbclient.create_app('Name of the App', 'shortname', 'Description')

Change the long description of an app:

app = pbclient.find_app(short_name='flickrperson')[0]
app.long_description = open('longdesc.html').read()

pbclient.update_app(app)

Replace the task presenter template:

app = pbclient.find_app(short_name='flickrperson')[0]
app.info['task_presenter'] = open('presenter.html').read()

pbclient.update_app(app)

Create a new task:

task_info = {
    'image': 'http://farm9.staticflickr.com/8146/7566819662_f2c74e77d8_m.jpg'
}
pbclient.create_task(app_id, task_info)

Project details


Download files

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

Source Distribution

pybossa-client-0.4.0.tar.gz (6.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page