Skip to content

Conversation

@KavanPrice
Copy link
Contributor

Overview

This adds a Python version of the JavaScript edge driver library to allow easy creation of edge drivers in Python. Python is often used by end users to interact with devices, so is a useful language for people to write their own drivers in as we move more towards a BYOD model.

The source is written as close to the original JS as possible with the addition of type hints from typing.

Building

This project was written using Poetry as a build system but can be used with any build system.

Testing

Simple unit tests have been implemented for this project. They require pytest to run. You can run these tests using pytest tests/.

@KavanPrice KavanPrice self-assigned this Jul 1, 2025
@KavanPrice KavanPrice marked this pull request as ready for review October 30, 2025 17:31
@KavanPrice
Copy link
Contributor Author

I've now made this such that drivers are intended to be run inside asyncio.run(). This simplifies greatly what I was trying to do with the internal async handling but we're now imposing restrictions on the library caller.

Copy link
Contributor

@amrc-benmorrow amrc-benmorrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nearly there, I think. Has this had any real-world-ish testing against an actual Edge Agent?

@KavanPrice
Copy link
Contributor Author

Nearly there, I think. Has this had any real-world-ish testing against an actual Edge Agent?

Yes, I've used this to recreate the JS polled test driver locally and published via an Edge Agent. Some data from this in the image below. I've included it in examples/.
image

@KavanPrice KavanPrice merged commit 8a2755f into main Nov 14, 2025
1 check passed
@KavanPrice KavanPrice deleted the kp/py-edge-driver branch November 14, 2025 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants