A Python wrapper for the Glasses3 API
To get more DEBUG logs from asyncio, set the environment variable PYTHONDEVMODE:
$env:PYTHONDEVMODE = 1
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
Docstrings is used to document code according to the following template:
"""Module summary
More in-depth information of the module. This docstring is placed at the top of the file, over the imports.
"""
import asyncio
def my_simple_function(arg_1: str, arg_2: int):
"""Summary of my_simple_function.
Takes in a name and number.
Returns a pair of glasses.
"""
pass
def my_long_function(arg_1: str, arg_2: int):
"""Summary of my_simple_function.
###### Args
- `arg_1`: The first argument.
- `arg_2`: The second argument.
###### Returns
Something you want to use.
###### Raises
- `MyError`: An error indicating some error.
"""
pass
class MyClass:
"""Summary of MyClass, max 80 characters long.
Some more in-depth information about MyClass.
"""
variable_1: str
"""The first variable"""
variable_2: int
"""The second variable"""
def __init__(arg_1: str):
"""Initializes object, where arg_1 is your `variable_1`."""
self.variable_1 = arg_1
def my_simple_method(arg_1: str, arg_2: int):
"""Summary of my_simple_method.
Takes in a name and number.
Returns something simple.
"""
pass
def my_long_method(arg_1: str, arg_2: int):
"""
Summary of my_long_method.
Some more in-depth information about my_long_method.
###### Args
- `arg_1`: The first argument.
- `arg_2`: The second argument.
###### Returns
Something you want to use.
###### Raises
- `MyError`: An error indicating some error.
"""
pass
class MyAdvancedClass:
"""Summary of MyAdvancedClass, max 80 characters long.
Some more in-depth information about MyClass.
"""
def __init__(arg_1: str, arg_2: int):
"""Initializes object.
###### Args
- `arg_1`: The first argument.
- `arg_2`: The second argument.
###### Raises
- `MyError`: An error indicating some error.
"""
pass