Getting started
Installation and Usage
Install with pip:
pip install tgclients
or in a Jupyter notebook:
!pip install tgclients
Databinding for TextGrid metadata
tgclients provide a databinding generated with xsdata for dealing with TextGrid metadata. This means that for tgsearch and tgcrud there are an implementation returning metadata with databinding (TextgridSearch, TextgridCrud) and one low level API without databinding (TextgridSearchRequest, TextgridCrudRequest).
With the databinding you can navigate the XML metadata as Python object and do not need to use XML parsers
or XPath. E.g: result.object_value.generic.provided.title[0]
gives you access to the first title.
To understand which metadata fields to find in what place of the TextGrid metadata model check the cheat sheet:
Example Jupyter notebooks
Here are some Jupyter Notebooks with examples how to work with the tgclients.