ABleService

Note

Note that when using ABle the __init__.py at the root level of the project will do some magic to detect what platform you are running and return a subclass of ABleService, you should import the subclass with from able import ABleService.

This class serves as the abstract base class for the platform specific implementations of the ABleService because each platform handles them a little differently. This class should never be used directly and exists for documentation purposes. All ABleServices are initialized the same way but feel free to check out the implementations of the different backends to see what is going on under the hood.

Class Definition

class able.service.ABleService(service_uuid, **kwargs)[source]

This is an abstract class for the Services that each platform backend defines. This class should never be used directly; instead, when the ABleService is imported from able, the appropriate subclass will be fetched based on what platform is being used.

Parameters

service_uuid (Union[str, UUID]) – the uuid of the service.

Variables
  • uuid – the uuid of the service

  • characteristics – a dictionary of uuid string - characteristic pairs, this is used to fetch a characteristic from a service if a reference to the characteristic is lost in your program.

Tip

Check out the GATT Setup on examples of how to use ABleServices.