tikal.low_level.brands package
Subpackages
Module contents
Brand registry for the Low-Level API.
Each supported BLE brand lives in its own subpackage (e.g. brands/lovense) and is registered here. BLEConnectionBuilder
builds its handler list from this registry, and the public BRANDS mapping (brand -> supported model names) is derived from it.
- Adding a new BLE brand:
Create a subpackage
brands/<brand>/with aBLEBrandHandlersubclass (and its toy class + model data).Append one
BrandRegistrationentry toBRAND_REGISTRATIONSbelow.
- tikal.low_level.brands.BRANDS: dict[str, list[str]] = {'Lovense': ['Solace', 'Sex Machine', 'Lush', 'Ferri', 'Nora', 'Osci', 'Mission', 'Flexer', 'Gravity', 'Dolce', 'Vulse', 'Tenera', 'Lapis', 'Ambi', 'Hyphy', 'Exomoon', 'Gush', 'Edge', 'Max', 'Diamo', 'Calor', 'Ridge', 'Hush', 'Domi', 'Gemini', 'Lush Anal', 'Spinel'], 'MockEstimToys': ['Thunder', 'Lightning']}
Public mapping of brand name -> list of supported model names.
BLE brands are derived from the registry above. Brands on other transports (which are not part of the BLE handler registry) are added explicitly afterwards, so
BRANDSstays the single source of truth for every supported brand.- Type:
dict[str, list[str]]
Example
print(BRANDS["Lovense"]) # ["Solace", "Lush", ...]
- tikal.low_level.brands.BRAND_REGISTRATIONS: list[BrandRegistration] = [BrandRegistration(name='Lovense', handler_cls=<class 'tikal.low_level.brands.lovense.handler.LovenseHandler'>, model_names=['Solace', 'Sex Machine', 'Lush', 'Ferri', 'Nora', 'Osci', 'Mission', 'Flexer', 'Gravity', 'Dolce', 'Vulse', 'Tenera', 'Lapis', 'Ambi', 'Hyphy', 'Exomoon', 'Gush', 'Edge', 'Max', 'Diamo', 'Calor', 'Ridge', 'Hush', 'Domi', 'Gemini', 'Lush Anal', 'Spinel'])]
All registered BLE brands. Add a new brand by appending its registration here.
- class tikal.low_level.brands.BrandRegistration(name: str, handler_cls: Type[BLEBrandHandler], model_names: list[str])[source]
Bases:
objectOne registered BLE brand: its display name, handler class, and supported model names.
- handler_cls: Type[BLEBrandHandler]
- model_names: list[str]
- name: str
- tikal.low_level.brands.build_handlers(on_disconnect: ~typing.Callable[[str], ~typing.Any], on_power_off: ~typing.Callable[[str], ~typing.Any], logger_name: str, client_class: ~typing.Type[~bleak.BleakClient] = <class 'bleak.BleakClient'>) list[BLEBrandHandler][source]
Instantiate one handler per registered brand.
Called by
BLEConnectionBuilderto populate its handler list. Every registered handler is constructed with the same signature (seeBLEBrandHandler).