Skip to content

flashbay-dev/fbay-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flashbay

Python SDK for flashbay — remote access to MCU development boards.

Use it in scripts, automation, or as a pytest plugin for hardware-in-the-loop testing.

Install

pip install flashbay

Quick start

from flashbay import Client

client = Client()

with client.session(board="esp32s3") as session:
    session.flash("firmware.bin")
    session.serial.expect("Ready", timeout=10)
    session.serial.send("status\n")
    print(session.serial.read_until("OK", timeout=5))

Or use the Board shorthand:

from flashbay import Board

with Board("esp32-s3", firmware="build/app.bin") as board:
    board.expect("System ready", timeout=5)
    board.send("gpio set 4 1\n")
    board.expect("GPIO4=HIGH", timeout=2)

pytest plugin

The package includes a pytest plugin that registers automatically. Use it with custom fixtures:

import pytest
from flashbay import Board

@pytest.fixture
def board():
    with Board("esp32-s3", firmware="build/app.bin") as b:
        yield b

def test_boot_ok(board):
    assert board.expect("System ready", timeout=5)

Or use the built-in flashbay_board fixture via CLI options:

pytest --flashbay-board esp32s3 --flashbay-firmware build/app.bin tests/hil/

Authentication

Set your API key via environment variable:

export FLASHBAY_API_KEY=key_...

Or pass it directly:

client = Client(api_key="key_...")

Documentation

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages