CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-bleak

Cross-platform Bluetooth Low Energy GATT client library for asynchronous BLE communication

Overall
score

97%

Overview
Eval results
Files

rubric.jsonevals/scenario-4/

{
  "context": "This criteria evaluates the engineer's proficiency in using Bleak's comprehensive exception hierarchy to implement robust error handling for Bluetooth Low Energy operations. The focus is on correctly catching and handling specific Bleak exception types.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "BleakScanner import",
      "description": "Imports BleakScanner from bleak package for device discovery functionality",
      "max_score": 5
    },
    {
      "name": "BleakClient import",
      "description": "Imports BleakClient from bleak package for device connection and characteristic operations",
      "max_score": 5
    },
    {
      "name": "BleakError import",
      "description": "Imports BleakError (base exception class) from bleak package",
      "max_score": 10
    },
    {
      "name": "BleakBluetoothNotAvailableError import",
      "description": "Imports BleakBluetoothNotAvailableError from bleak.exc package to handle Bluetooth unavailability",
      "max_score": 10
    },
    {
      "name": "BleakDeviceNotFoundError import",
      "description": "Imports BleakDeviceNotFoundError from bleak.exc package to handle device discovery failures",
      "max_score": 10
    },
    {
      "name": "BleakCharacteristicNotFoundError import",
      "description": "Imports BleakCharacteristicNotFoundError from bleak.exc package to handle characteristic access errors",
      "max_score": 10
    },
    {
      "name": "Bluetooth availability exception handling",
      "description": "Catches BleakBluetoothNotAvailableError when checking Bluetooth availability and extracts error details to determine specific failure reason (no_adapter, powered_off, etc.)",
      "max_score": 15
    },
    {
      "name": "Device discovery exception handling",
      "description": "Catches BleakDeviceNotFoundError when device is not found during discovery using BleakScanner.find_device_by_address() and returns None or appropriate error response",
      "max_score": 15
    },
    {
      "name": "Characteristic not found handling",
      "description": "Catches BleakCharacteristicNotFoundError when attempting to read a non-existent characteristic using BleakClient.read_gatt_char() and returns appropriate error response",
      "max_score": 15
    },
    {
      "name": "Base BleakError handling",
      "description": "Catches base BleakError exception for generic BLE errors that don't fall into specific exception categories, demonstrating understanding of exception hierarchy",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-bleak

tile.json