Run PyBossa apps outside of PyBossa
JavaScript Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

PyBossa Apps

Light-weight framework for developing PyBossa apps outside of PyBossa.


PyBossa Apps is a Python-based web application that uses the framework. Depends on pybossa-client.

> git clone
> cd pybossa-apps

Copy the to and edit it to set the url of your PyBossa instance.

> cp

Run PyBossa Apps locally to test installation:

> python

Setup with Authentication

If you want to use PyBossa Apps with user authentication you need to deploy it on a sub-domain of your PyBossa instance. To make the PyBossa session cookies accessible from subdomains you need to add the following to the of your PyBossa instance (and not PyBossa Apps). Replace with your domain and don't forget the leading dot.

# allow subdomains to access the auth cookie

Update your task presenters

The PyBossa Apps framework allows you to simplify the logic of your task presenters. Here's a simple example:

<h1>My PyBossa App</h1>

<!-- status message if no more tasks are available, hidden by default -->
<div id="finish" style="display:none">
    <p>Congrats, you solved all tasks!</p>

<!-- task details, hidden by default -->
<div class="task" style="display:none">
    <div class="task-info"></div>
    <p>Do you see a human on this image?</p>
    <button onclick="submitTask('yes')">yes</button>
    <button onclick="submitTask('no')">no</button>
    <div class="status"></div>

<script type="text/javascript">

 * will be called automatically after the task has been loaded
function taskLoaded(info) {
    // show image
    $('.task-info').append('<img src="' + info.imageUrl + '" />');
    // unhide task details

function submitTask(answer) {
    // show that the task will be submitted (optional)
    $('button').attr('disabled', true);
    $('.status').html('Your answer will be submitted now.');

    // submit task
    PyBossaApp.saveTask(answer, function(data) {
        // show that the next task will be loaded
        $('.status').html('Your answer has been submitted. Loading next task now.');

        // load next task, will unhide #finish if no more tasks are available