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

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.4.2.tar.gz (15.2 kB view hashes)

Uploaded Source

Built Distribution

sr.comp.http-1.4.2-py2.py3-none-any.whl (35.1 kB view hashes)

Uploaded Python 2 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