bluez_peripheral.gatt.base module

class bluez_peripheral.gatt.base.ReadOptionsT

The type of options supplied by a dbus ReadValue access.

alias of TypeVar(‘ReadOptionsT’)

class bluez_peripheral.gatt.base.ServiceAttribute(*args, **kwargs)[source]

Bases: Generic[ReadOptionsT, WriteOptionsT], ABC

Base class for service components with a ReadValue and WriteValue dbus interface.

Parameters:
property service: Service | None

Gets the service that this attribute is a child of.

setter(setter_func)[source]

Decorator for specifying a setter to be called by the ReadValue interface.

Parameters:

setter_func (Callable[[Any, bytes, WriteOptionsT], None] | Callable[[Any, bytes, WriteOptionsT], Awaitable[None]])

Return type:

ServiceAttribute[ReadOptionsT, WriteOptionsT]

class bluez_peripheral.gatt.base.WriteOptionsT

The type of options supplied by a dbus WriteValue access.

alias of TypeVar(‘WriteOptionsT’)