Getting Started
Manage your Projects and data with Python
Description
You can use our Python API Wrapper to easily access and manage your Projects, Datasets, Images and labeled data from your own Python projects or Jupyter Notebooks. This documentation will guide you through the installation process and provides you with some common use cases.
Latest Release: v0.2 on April 6, 2020.
Upgrade your datagym package with pip install --upgrade datagym
Prerequisites
Python Version: Ensure you have one of the following Python versions installed - Python 3.6, 3.7, 3.8
DataGym Account: If you haven't got a DataGym account yet, please Sign Up
Initial Project: Setup your first Project and/or label some images in your Dummy Project
API Token: In order to access your Dummy Project via our Python API you need to create an API Token
After finishing the initial preparations as described above, we have our first Dummy Project and some labeled images to work with in this tutorial. Feel free to mix in some of your own Projects and labeled data if you already used DataGym.
Step 1: Package Installation
The DataGym Python API can easily be installed from the Python Package Index (PyPI) via pip. Therefore, you only have to execute the following command on your machine:
Step 2: Create a Client
In order to connect to your Projects you have to import and initialize the API Client from the datagym package. Just put in your API Key into the Client and you're good to go!
The Client object is the gateway to the data from your DataGym account. You can use the Client to get your Projects, Datasets, Images, and labeled data.
Step 3: Fetch your Projects
You can fetch all your Projects including their connected Datasets in a single line.
This may raise an API Exception with the Message: ´Forbidden.´. If you see see this error, please sign into your DataGym account and check if your API Token is valid.
Use-Case: If you want to inspect your Projects you can simply write a little script to print a report.
Your output could look like this:
That's it, now you are connected to your DataGym account. You can use the Client to easily access your labeled data, Projects, Datasets, and images. Follow the next pages of this documentation to explore the possibilities of DataGym's Python API!
Visit and copy our Jupyter Notebooks to get a comprehensive overview of the functionality.
Last updated