{"id":34094775,"url":"https://github.com/sourcebots/sbot","last_synced_at":"2026-03-17T16:38:46.003Z","repository":{"id":35394245,"uuid":"182148324","full_name":"sourcebots/sbot","owner":"sourcebots","description":"SourceBots  Robot API","archived":false,"fork":false,"pushed_at":"2025-12-12T12:03:00.000Z","size":14225,"stargazers_count":4,"open_issues_count":7,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-12-16T18:47:29.462Z","etag":null,"topics":["python-api","robotics","robotics-competition"],"latest_commit_sha":null,"homepage":"https://docs.sourcebots.co.uk/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sourcebots.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-04-18T19:49:20.000Z","updated_at":"2025-08-09T09:24:59.000Z","dependencies_parsed_at":"2024-06-29T20:25:46.144Z","dependency_job_id":"7255d0c1-7707-4f94-8945-38989e895ffd","html_url":"https://github.com/sourcebots/sbot","commit_stats":{"total_commits":314,"total_committers":19,"mean_commits":"16.526315789473685","dds":0.6369426751592357,"last_synced_commit":"90f6bc7780794932e4e2787b9d160ae1abe1329f"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/sourcebots/sbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcebots%2Fsbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcebots%2Fsbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcebots%2Fsbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcebots%2Fsbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sourcebots","download_url":"https://codeload.github.com/sourcebots/sbot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcebots%2Fsbot/sbom","scorecard":{"id":839268,"data":{"date":"2025-08-11","repo":{"name":"github.com/sourcebots/sbot","commit":"55eaa5e59de76eb7ab52b85667635a7cd811635a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.4,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":5,"reason":"6 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":7,"reason":"Found 6/8 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test_build.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_build.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/sourcebots/sbot/test_build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_build.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/sourcebots/sbot/test_build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_build.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/sourcebots/sbot/test_build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_build.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/sourcebots/sbot/test_build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test_build.yml:68: update your workflow using https://app.stepsecurity.io/secureworkflow/sourcebots/sbot/test_build.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/test_build.yml:75: update your workflow using https://app.stepsecurity.io/secureworkflow/sourcebots/sbot/test_build.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/test_build.yml:34","Warn: pipCommand not pinned by hash: .github/workflows/test_build.yml:35","Warn: pipCommand not pinned by hash: .github/workflows/test_build.yml:61","Warn: pipCommand not pinned by hash: .github/workflows/test_build.yml:63","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/test_build.yml:46"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T20:00:58.637Z","repository_id":35394245,"created_at":"2025-08-23T20:00:58.637Z","updated_at":"2025-08-23T20:00:58.637Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30627237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T14:16:03.965Z","status":"ssl_error","status_checked_at":"2026-03-17T14:16:03.380Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python-api","robotics","robotics-competition"],"created_at":"2025-12-14T15:04:53.881Z","updated_at":"2026-03-17T16:38:45.993Z","avatar_url":"https://github.com/sourcebots.png","language":"Python","readme":"# sbot\n\n[![Lint \u0026 build](https://github.com/sourcebots/sbot/actions/workflows/test_build.yml/badge.svg)](https://github.com/sourcebots/sbot/actions/workflows/test_build.yml)\n[![PyPI version](https://badge.fury.io/py/sbot.svg)](https://badge.fury.io/py/sbot)\n[![Documentation Status](https://readthedocs.org/projects/sbot/badge/?version=stable)](https://docs.sourcebots.co.uk)\n[![MIT license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://opensource.org/licenses/MIT)\n![Bees](https://img.shields.io/badge/bees-110%25-yellow.svg)\n\n`sbot` - SourceBots Robot API\n\nThis is the API for Southampton Robotics Outreach robotics competitions.\n\n## Installation\n\nIf you wish to install openCV from your package manager, you can install the base package with:\n\n```bash\npip install sbot\n```\n\nTo install the full package, including openCV, you can install with:\n\n```bash\npip install sbot[vision]\n```\n\n## Usage\n\nImporting the module will, by default, trigger board discovery and wait for the start button to be pressed.\n\n```python\nimport sbot\n```\n\nUnlike previous versions, robot functionality is accessed directly from the `sbot` library instead of instantiating a class.\n\n```python\nfrom sbot import *\n\nmotors.set_power(0, 0.3)\nmotors.set_power(1, 0.3)\n\npower.get_output_current(PowerOutputPosition.H0)\nutils.sound_buzzer(880, 0.5)\n\nservos.set_position(0, 45/90)\n\nprint(arduino.measure_ultrasound_distance(8, 9))\n\nif comp.is_competition:\n    markers = vision.detect_markers()\n    leds.set_colour(0, Colour.MAGENTA)\n```\n\n### Startup behaviour\n\nYou can configure the startup behaviour of `sbot` with an `override.env` file in the same directory as your project.\n\nExample `override.env` file:\n\n```sh\nENABLE_DEBUG_LOGGING=1\nSKIP_WAIT_START=1\nNO_POWERBOARD=1\n```\n\nIf `SKIP_WAIT_START` is set, you will have to manually trigger board discovery and wait for the start button:\n\n```python\nfrom sbot import utils\n\nutils.load_boards()\nutils.wait_start()\n```\n\nThe currently supported override keys are:\n\nOverride | Description\n--- | ---\nENABLE_DEBUG_LOGGING | Enable debug logging\nENABLE_TRACE_LOGGING | Enable trace level logging\nSKIP_WAIT_START | Don't block for the start signal automatically\nNO_POWERBOARD | Allow running without a power board\nMANUAL_POWER_PORTS | Specify additional serial ports for power boards\nMANUAL_MOTOR_PORTS | Specify additional serial ports for motor boards\nMANUAL_SERVO_PORTS | Specify additional serial ports for servo boards\nMANUAL_ARDUINO_PORTS | Specify additional serial ports for arduino boards\nMANUAL_LED_PORTS | Specify additional serial ports for led boards, only used in the simulator\nMANUAL_TIME_PORTS | Specify additional serial ports for the time interface, only used in the simulator\nSORT_POWER_ORDER | Override the sort order of the power boards, unused\nSORT_MOTOR_ORDER | Override the sort order of the motor boards\nSORT_SERVO_ORDER | Override the sort order of the servo boards\nSORT_ARDUINO_ORDER | Override the sort order of the arduino boards, unused\nSORT_LED_ORDER | Override the sort order of the led boards, unused\nSORT_TIME_ORDER | Override the sort order of the time interface, unused\n\nYou can also configure these settings as environment variables, by prepending the prefix `SBOT_`. For example, `ENABLE_DEBUG_LOGGING` can be set as `SBOT_ENABLE_DEBUG_LOGGING`. \nSome settings can only be configured as environment variables. These are:\n\nEnvironment Variable | Description\n--- | ---\nOPENCV_CALIBRATIONS | Override the location to look for additional camera calibrations, defaults to the working directory\nSBOT_METADATA_PATH | Override the location to look for metadata files, normally configured by the runner\nSBOT_PYTEST | Set to `1` when running unit tests, to disable automatic discovery on import\nSBOT_MQTT_URL | The URI to use for the MQTT broker, normally configured by the runner\nrun_uuid | The UUID to include in all MQTT messages, normally configured by the runner\nWEBOTS_SIMULATOR | Set to `1` when running in the Webots simulator, used to detect the simulator environment\nWEBOTS_ROBOT | List of socket URIs to connect to for the simulated boards, configured by the runner\nWEBOTS_DEVICE_LOGGING | Set to the log level name to use for logging of the simulated boards, defaults to `WARNING`\n\n## Developer Notes\n\nThere are a number of considerations that have been made in the design of this API.\nSome of these may not be immediately obvious, so they are documented below.\n\n- `tuple` is used to prevent the user from adding, removing or overwriting items in any parts of the API that would return a list.\n- `__slots__` is used to prevent the user from adding, removing or overwriting attributes in any parts of the API.\n- `sbot.serial_wrapper.SerialWrapper` handles automatic reconnection to the serial port if the connection is lost and impleents 3 retries on any serial operation before raising a `BoardDisconnectionError`.\n- The old API is still available under `sbot.historic`, though this might change.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcebots%2Fsbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsourcebots%2Fsbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcebots%2Fsbot/lists"}