PylotOS Developer SDK (sdk.pylotos.org)

Welcome to the official documentation, tutorial hub, and API reference for pylotos-sdk — the unified MicroPython developer toolkit, IDE type-stub suite, zero-copy wireless helper library, and 30-board pixel-accurate simulator for PylotOS.

pip install git+https://github.com/PylotOS/pylotos-sdk.git

Zero Flash Overhead for Desktop Tooling: PylotOS freezes only the compact MicroPython runtime modules (pylotos.ui and pylotos.wireless) into ESP32 ROM. All .pyi type stubs, pylotos-sim, documentation, and pytest loopback mocks run purely on your workstation at 0 bytes of microcontroller Flash cost.


Three-Layer Architecture Boundary

PylotOS cleanly separates deterministic C hardware execution from ergonomic async Python application logic:

LayerResponsibilityStrict Invariant
1. Pure-C HAL (drivers/*)board.json v2 init, hal_spi_bus_lock() / I2C mutexes, DMA/ISR, static SPSC ringbuffers, esp_pm locks, EU868 1% duty-cycle enforcement, pin-guard registry.Zero mp_obj_t or MicroPython GC heap access from ISRs or Core 0 tasks.
2. C – MP Binding (cmodules/*)import hal, import sys_ota, import sys_web, mp_stream_p_t (MP_STREAM_POLL + mp_hal_wake_main_task_from_isr()), zero-copy recv_into(buf), soft-reset HAL_OWNER_APP cleanup.No chip-specific register bit-banging in binding code; deterministic OSError / ValueError mapping.
3. Python SDK (pylotos-sdk)Declarative pylotos.ui across 8 displays & 6 inputs, RLE fonts/icons/themes/alerts, pylotos.wireless async zero-copy & NDEF/MIC helpers, .pyi stubs, and 30-board pylotos-sim.Write once — runs identically on TFT, Round LCD, 1-bit OLED, Core 0 :80/:443 Web UI, and pylotos-sim.

SDK Capabilities at a Glance

Module / ToolWhat It Provides
pylotos.uiReactive State & Binding, 20+ adaptive widgets, ThemeManager (dark, light, high_contrast), priority NotificationManager, RLE proportional fonts (475 B ROM), and 20 semantic 16×16/24×24 icons (640 B ROM).
pylotos.wirelessCooperative zero-copy recv_rf_into, recv_espnow_into, poll_nfc_into, pure-Python NDEF URI/Text decoder (decode_ndef_record), and replay-protected authenticated framing (pack_frame / unpack_frame).
IDE .pyi StubsComplete Pylance / Pyright / PyCharm autocomplete for hal (Core + 8 Wireless subsystems + DMA Audio + ULP + USB + CAN), sys_ota, sys_web, pylotos.events, pylotos.services, pylotos.overlays, pylotos.app_store, pylotos.policy, pylotos.mqtt_ha, pylotos.modbus, and pylotos.ble_dfu.
pylotos-simPixel-accurate async CLI simulator (pylotos-sim app.py --board m5stack_dial) rendering physical RGB565/1-bit displays side-by-side with the live responsive Web Dashboard (ui_renderer.js), plus install_sim(board_id) for headless pytest suites.

Where to Start

  1. Getting Started & IDE Setup — Install pylotos-sdk, configure VS Code / Cursor / PyCharm, build your first app, and deploy over LAN or MCP Bridge.
  2. Adaptive UI, Themes, RLE Fonts & Icons — Master pylotos.ui across all 8 display archetypes and 6 input profiles.
  3. 30-Board Simulator & Pytest Harness — Preview apps in your browser and write deterministic hardware-free unit tests.
  4. OS EventBus, Services & App Store — Decouple sensors, background services, per-device configs, and signed .pylot-app packages.
  5. Wireless C HAL, Overlays & Zero-Copy — Build LoRa (SX1262/CC1101), ESP-NOW, NFC/NDEF, RMT IR, GNSS, and 802.15.4 apps with 0 B ISR allocation.
  6. DMA Audio, ULP, Industrial & Asym-OTA — Stream Core 0 I2S PCM audio, use ULP shared RAM, speak CAN/Modbus/MQTT-HA, and inspect Asymmetric Recovery-OTA.
  7. Runnable Examples Gallery & Complete API Reference.