Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

tobiipro/g3pylib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1798de9 · Nov 20, 2024
Aug 26, 2022
Aug 26, 2022
Feb 7, 2023
Aug 12, 2022
Feb 7, 2023
Aug 26, 2022
Jul 4, 2022
Aug 17, 2022
Aug 17, 2022
Aug 12, 2022
Nov 20, 2024
Feb 7, 2023
Aug 15, 2022
Aug 22, 2022
Feb 7, 2023

Repository files navigation

Migrated to https://github.com/tobii/glasses3-pylib

Glasses3 Python Library

This library is still in alpha. It's not yet feature complete and there are no guarantees that the API will be stable.

A Python client for Glasses3. It handles all the low level details of communication with the Glasses3 websocket API and exposes a Python API which includes all the endpoints in the websocket API of the Glasses3 as well as some extra convenience methods. It also implements streaming with RTSP and service discovery with Zeroconf.

Note

This library should be platform independent in theory but the development has been done mainly in Windows environments and it's only briefly tested on other platforms.

Installation

For the moment we only support Python 3.10.

To install this package, clone it and use either

flit install

or

pip install .

To run examples or tests you need some extra dependencies which are installed by default with the flit command. If you are using pip the extra dependencies can be installed alongside the library with

pip install '.[test, examples, example-app]'

on windows: pip install ".[test, examples, example-app]"

Documentation

The library documentation can be found here and there is also a developer guide for the glasses API in PDF format which can be downloaded here.

Environment

The tests and examples load the glasses hostname, which by default is the serial number, from the .env file in the project root folder. See example content below:

G3_HOSTNAME=tg03b-080200045321

You can also specify this variable directly in your environment.

Examples

The example folder contains a few smaller examples showcasing different use cases of the library as well as a larger controller application with a simple GUI.

Run the example app with python examples/g3pycontroller.

Note, the examples use OpenCV, and there is a known issue with OpenCV and PyAv. If you experience freezes when displaying video frames in the samples, please check out the workarounds in the OpenCV repo. Thanks @edavalosanaya for mentioning this in #83.

Contributing

More information on how to contribute to this project can be found in CONTRIBUTING.md.

It contains developer guidelines as well as information on how to run tests and enable logging.

About

A Python client library for Glasses3

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages