Overview

This documentation outlines usage for LogQS.

Quick Start

Loading an image from LogQS
 from lqs import LogQS

 lqs = LogQS()

 log = lqs.resource.Log.fetch("Demo Log")
 topic = log.list_topics(type_name="sensor_msgs/Image")[0]
 record = topic.list_records()[0]
 record.load_auxiliary_data_image()
../_images/fetched_image.jpg

The thumbnail of the image fetched from LogQS.

LogQS operates as a REST API service, meaning you can interact with it however you can make HTTPS requests. However, it’s much easier to use the LogQS Client Python library. We will use the client for these docs, but be aware that these interactions don’t require it.

First, we set up the environment by install LogQS:

pip install --upgrade LogQS

Then, we import the client class.

from lqs import LogQS

To access a DataStore, the LogQS Client requires, at a minimum, three parameters to be explicitly configured:

  • api_key_id - The ID of the API Key being used to access the service

  • api_key_secret - The secret of the API Key being used to access the service

  • datastore_id - The ID of the DataStore being accessed

An API Key can be generated from the Studio app. The API URL should be the “base” URL, e.g., https://api.logqs.com, and not the URL of a specific endpoint, e.g., https://api.logqs.com/apps/lqs/api, etc.

These parameters can be passed to the client in a few ways:

  • As parameters to the constructor (either as a dict or as a RESTClientConfig object)

  • As environment variables (i.e., LQS_API_KEY_ID, LQS_API_KEY_SECRET, and LQS_DATASTORE_ID, which will be loaded from a .env file if present)

  • As a configuration file (i.e., logqs-config.json with a single object containing the three parameters)

By default, the client will use the api_url of https://api.logqs.com. If you are using a different API URL, you will need to pass it to the client.

lqs = LogQS()

Generally, using LogQS involves either ingesting or querying record data. All record data is associated with a single topic, which is associated with a single log, which is associated with a single group.

In a fresh DataStore, you can ingest a log file by first creating a group then a log in that group. You can then upload a file to that log and create an ingestion for the file. Once the ingestion process is complete, you can list the topics created by the ingestion and query records from those topics.

Support

For any support questions please open a ticket on our support portal with a detailed description of your question or issue.