Unofficial Dynamox API Documentation¶
Unofficial Python client library for Dynamox API. The motivation behind this project is to provide a simple and easy-to-use interface to interact with the API, without the need to deal with HTTP requests and authentication.
Installation¶
With pip:
pip install git+https://github.com/GAMA-Dynamox/dynamox-api@main
With poetry:
poetry add git+https://github.com/GAMA-Dynamox/dynamox-api@main
With uv:
uv add git+https://github.com/GAMA-Dynamox/dynamox-api@main
Usage¶
The class DynamoxAPI is the main class to interact with the API. It requires an authentication token to run, which is a json file specified by the parameter api_key_path. This class deals with the authentication with the token endpoint and provides methods to interact with the API.
from dynamox_api import DynamoxAPI
api = DynamoxAPI(api_key_path='api_key.json')
Waveform¶
This API provides access to waveform data and related metrics. Users can retrieve raw waveforms (time-domain), spectra (frequency-domain), and computed scalar metrics derived from the waveforms or their spectral analysis.
Raw waveform¶
raw_waveform = api.get_waveform(waveform_id='waveform_id', method="raw")
Spectra¶
spectra = api.get_waveform(waveform_id='waveform_id', method="spectrum")
Metrics¶
metrics = api.get_waveform(waveform_id='waveform_id', method="metrics")