Skip to main content

HTTP API for Student Robotics Competition Software

Project description

Build Status Docs Status

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


Download files

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

Source Distribution

sr.comp.http-1.8.3.tar.gz (12.1 kB view hashes)

Uploaded Source

Built Distribution

sr.comp.http-1.8.3-py3-none-any.whl (26.6 kB view hashes)

Uploaded Python 3

Supported by

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