HTTP API for Student Robotics Competition Software
Project description
A HTTP interface around SRComp, the fifth round of Student Robotics competition software.
This repository provides a JSON API to accessing information about the state of the competition. It is a lightweight Flask application wrapping the SRComp python APIs to the competition state.
Usage
Install:
pip install sr.comp.http
Configuration
In deployment you should configure the app by setting the COMPSTATE key of the app’s config to the absolute path of the compstate which the server intends to serve.
from sr.comp.http import app
app.config['COMPSTATE'] = '/path/to/compstate'
Development
Clone:
For tests to work, you will need to clone the tests/dummy submodule too:
git submodule update --init
Install:
pip install -e .
Run: ./run $COMPSTATE.
Test: ./run-tests
Developers may wish to use the SRComp Dev repo to setup a dev instance.
State Caching
Since loading a given state repo takes a non-trivial amount of time, this is cached within the Flask application. Updates to the state repo are not tracked directly, and must be signalled by running the ./update script provided.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sr.comp.http-1.9.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3e2dd675e824ce1fc774a7b53cfd5713cd16756f8464dcdc9682b6c53e20fb7 |
|
MD5 | 609616cffa948d6d568fe60c608be8be |
|
BLAKE2b-256 | 54a806da1ecb0b048aceb87eaa35c5e1246bc19c1e3d9f3548614c73dffd7fbe |