Python client library?

Hi all, as you know we’ve been supporting an R package for a number of years, but we don’t have an official client library for Python.

I do have the feeling that there are a half a dozen partial client libraries written by users out there!

How can we best support Python developers? Do you have something started that we could help complete and make official?

2 Likes

Hi Alex,

As discussed previously, I started to work on a Python module a while back but haven’t made much progress for lack of time.
I will clean up my code and put it on GitHub. I will share the link here once done.

3 Likes

Thanks, Pierre! That would be fantastic :+1:

Hello everyone

I’ve developed a simple Python script for exporting and importing data. I’ll wait for Pierre to share the code on GitHub and will look into integrating or aligning mine with it to support a more unified approach.

3 Likes

Terrific, Basel! Do you use pandas or another data science-y libraries in your script, or just plain Python?

Feel free to post the script here or share via a Gist in the meantime.

1 Like

You can access the script using this link: gist:ccae2b49a3b27eb0489d7c7d6d609d0c · GitHub

It allows you to download data using a form ID, filter the dataset by specifying a column and desired value, and then save both the full dataset and the filtered version

Hi Alex, Basel,

I pushed my code to GitHub: pvernier/activipyinfo: A Python API for ActivityInfo

See the README file for examples on how to use it.

My needs at the time were mainly to push data to ActivityInfo, not so much to read data, so this is what I focused on in the code.
But for reading, my idea was to store the data in pandas DataFrames. I followed this approach in the module I created for Kobo: pvernier/pykobo: A Python module to fetch data from the Kobo API

2 Likes