sr-robot3
sr-robot3 - Python 3 API for Student Robotics Kit
This is the API for Student Robotics, library for writing Robotics APIs. It will first be deployed at Student Robotics 2024.
Installation
If you wish to install openCV from your package manager, you can install the base package with:
pip install sr-robot3
To install the full package, including openCV, you can install with:
pip install sr-robot3[vision]
Usage
The main entry point for the API is the Robot class.
Intantiating this class will automatically detect and connect to any SR v4 boards connected to the device.
By default, the Robot class will wait for the start button on the power board to be pressed before continuing.
from sr.robot3 import Robot
r = Robot()
To disable the waiting for the start button, you can pass wait_for_start=False to the constructor.
The wait_for_start method needs to be called before the metadata is available.
from sr.robot3 import Robot
r = Robot(wait_for_start=False)
# Setup in here
r.wait_start()
Developer Notes
There are a number of considerations that have been made in the design of this API. Some of these may not be immediately obvious, so they are documented below.
- The API is designed to raise exceptions for incorrect actions, such as trying to modify the output dictionary or assign a value directly to the motor object.
MappingProxyTypeis used to prevent the user from adding, removing or overwriting keys in any parts of the API that return a dictionary.tupleis used to prevent the user from adding, removing or overwriting items in any parts of the API that would return a list.__slots__is used to prevent the user from adding, removing or overwriting attributes in any parts of the API.sr.robot3.serial_wrapper.SerialWrapperhandles automatic reconnection to the serial port if the connection is lost and impleents 3 retries on any serial operation before raising aBoardDisconnectionError.
Metadata
Release files for sr-robot3 2026.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sr_robot3-2026.0.3.tar.gz | 65.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sr_robot3-2026.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 118.7 kB
Release files / sr_robot3-2026.0.3.tar.gz
| Download URL | sr_robot3-2026.0.3.tar.gz |
|---|---|
| Size | 65.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
517b1bd42ca5efa91b18a7f289ea1e8bf86bd7649342e8ec5a7ead865dd4bc5c
|
|
BLAKE2b-256 checksum How to use checksums |
3edbb1719b47aa6bcda328a8a7776824bce584ea32ab1df2fdc72333976318ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2025.
Transparency logRelease files / sr_robot3-2026.0.3-py3-none-any.whl
| Download URL | sr_robot3-2026.0.3-py3-none-any.whl |
|---|---|
| Size | 53.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c13857294b7cb45525440818437163014cc1e6c2809bdb4634242023313e2f81
|
|
BLAKE2b-256 checksum How to use checksums |
320b24b69aa0385ff2809ace4c19ffd6062db7771c28783039ed939dd3ed5042
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 12, 2025.
Transparency log