Skip to content

Namespace Belay.Attributes

Classes

PythonCodeAttribute

Specifies Python code to be executed on the MicroPython device when a method is called. This attribute allows embedding Python code directly in the method declaration without requiring the method to have an implementation body.

SetupAttribute

Marks a method to be executed once during device initialization. Methods decorated with this attribute are automatically called when the device connects and establishes communication, providing a hook for device-specific setup.

TaskAttribute

Marks a method as a remote task to be executed on a MicroPython device. Methods decorated with this attribute will have their code deployed to the connected device and executed remotely when called from the host application.

TeardownAttribute

Marks a method to be executed during device disconnection or disposal. Methods decorated with this attribute are automatically called when the device connection is terminated, providing cleanup and resource management capabilities.

ThreadAttribute

Marks a method to be executed as a background thread on the MicroPython device. Methods decorated with this attribute run asynchronously on the device without blocking the host application or other device operations.

Enums

ThreadPriority

Defines the priority levels for thread execution.

Released under the Apache License 2.0.