Base Classes

class pupil_labs.realtime_api.base.DeviceBase(address, port, full_name=None, dns_name=None, suppress_decoding_warnings=True)[source]

Bases: ABC

Abstract base class representing Realtime API host devices

address

Type:    str

REST API server address

api_url(path, protocol='http', prefix='/api')[source]
Return type:

str

classmethod convert_from(other)[source]
Return type:

~DeviceType

dns_name

Type:    Optional[str]

REST API server DNS name, e.g. pi.local.

classmethod from_discovered_device(device)[source]
Return type:

~DeviceType

full_name

Type:    Optional[str]

Full service discovery name

port

Type:    int

REST API server port

class pupil_labs.realtime_api.base.DeviceType

Type annotation for concrete sub-classes of DeviceBase.

alias of TypeVar(‘DeviceType’, bound=DeviceBase)