Skip to content
Ona Python API
Branch: develop
Clone or download

Python bindings to the OnaData API

This repo contains the sources for the OnaData python client library. You can read more about OnaData here


pip install git+

OR as a pip editable if you'd like to develop this in parallel with your project:-

pip install -e git://

Example Usage


from onapie.client import Client
client = Client('', username='your_ona_username', password='S00p3rS3kret')

or if you prefer to use your api_token:-

client = Client('', api_token='your_ona_api_token')

Working with forms

Upload form:

  • From file forminfo_dict = client.forms.create('/path/to/form.xls')
  • From URL forminfo_dict = client.forms.create('/path/to/form.xls')

Get form:

  • Info forminfo_dict = client.forms.get('form_pk')
  • Representation json_form_repr = client.forms.get('form_pk', 'JSON')

List forms:

  • Full list form_list = client.forms.list()

Working with Data


  • List all data endpoints data_endpoints =

Get submitted data for a given form:

  • All: form_data_list =
  • Single: form_datum =, datum_id)
  • By tags: form_data_list =, None, tag1, tag2, tag3, tag4)
  • By query:- form_data_list =, None, param1=value1, param2=value2 )


  • [Fork and] create a branch named according to the feature you want to work on
  • Clone your new repo & create a virtualenv for it
  • Install the dev dependencies: pip install -r dev-requiremets.txt
  • Setup the pre-commit Hook: ln -s ../../ .git/hooks/pre-commit
  • Contribute/Develop/Hack
  • Send a pull request against the develop branch
You can’t perform that action at this time.