Skip to content

Quick Start

This quick start guide covers the installation of the Sonardyne API Python library, device setup & basic API communication. To verify your device is compatible with version 2 of the API, see Versioning & Compatibility.

Requirements

  • Python 3.12

Installation

The Sonardyne API is pip installed by running the following command:

pip install git+https://github.com/Sonardyne/son-idl.git@2.0.0#subdirectory=libraries/python/sonardyne_api

Device Setup

SPRINT-Nav

Setting External Control Port

To set up a SPRINT-Nav for use with the API, navigate to configuration/system/connections and set the external control port.

Connecting to a Device

Once installed, we can use the API to connect to a device and check which version of the API it is running.

Input:

import sonardyne_api as son
with son.WrapperGrpc('192.168.179.50', 7777) as wrapper:
    api_version = wrapper.get_version().api_version
    print(f"Device using API Version {api_version.major}.{api_version.minor}.{api_version.patch}.")
Output:
Device using API Version 2.0.0.

For more examples, see Python Examples.