Projects
Fetch your DataGym.ai Projects including their connected Datasets and images
Description
The Project object in our Python API Wrapper is a representation of the Projects you already know from DataGym.ai. This object includes all the data that belongs to your DataGym.ai Project, such as connected Datasets and Images. Projects can be accessed through the Client object introduced in the Getting Started page.
Fetching Projects from DataGym
Before we look at the Project object in our Python API Wrapper, you first have to learn how to get the data from DataGym.ai. There are multiple ways to get your Projects from DataGym's backend.
Get all Projects
get_projects
returns all Projects in a list.
Get a Project by its name
get_project_by_name
returns a specific Project by its unique name
The Project object
Project Attributes
The Project object of the Python API is modeled after DataGym's Projects and, therefore, inherits the same attributes you already know from your Projects.
As you can see, a Project object also contains a list of its connected Datasets, which are represented as Dataset objects.
Project helper methods
A Project can hold an arbitrary number of Datasets which also can hold an arbitrary number of images. To simplify the access to these objects, the Project object provides a variety of helper methods.
Get a Dataset by its name
get_dataset_by_name
returns a single Dataset or None
if no Dataset with the given name was found.
Get all Images from a Project
get_images
returns a list of all Images from all Datasets connected to the Project.
Get Images by name
In some cases you might only be interested in a specific set of images. The get_images_by_name
method can reduce the effort of searching for these images with your own scripts. The method takes an image name and returns the image(s) with this exact name within your Project.
get_images_by_name
returns a list of Images that match the search term
You can also use regular expressions to start a broader search and return all images that fit into a specific naming pattern. For example, let's get all satellite images from your project by searching for the regular expression "satellite.*":
Last updated