Skip to main content

Python SDK and pytest fixtures for flashbay hardware-in-the-loop testing

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flashbay-0.1.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flashbay-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file flashbay-0.1.0.tar.gz.

File metadata

  • Download URL: flashbay-0.1.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for flashbay-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3e92df93f15ea17d42669b5757befb752675549c5a153b6084d2946b22d09149
MD5 f7ce257b819e0626ce0420b3cd7a1051
BLAKE2b-256 f580501f725debae19f2f9d5eba80d11eb23541ad4d45836073bb18daeccea53

See more details on using hashes here.

Provenance

The following attestation bundles were made for flashbay-0.1.0.tar.gz:

Publisher: publish.yml on flashbay-dev/fbay-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flashbay-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: flashbay-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for flashbay-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 27e4ed7afd6927a16710be36c9e13fab6008199639bdafa68105640c84d33bfc
MD5 d789eaba9664e95aae8594d38f8df432
BLAKE2b-256 ec70c38c0abb1f2f280cdb0d623350c136a0f6cbaac39ae9af4bf7fcaa14d4a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for flashbay-0.1.0-py3-none-any.whl:

Publisher: publish.yml on flashbay-dev/fbay-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page