sr.comp.http


Namesr.comp.http JSON
Version 1.9.0 PyPI version JSON
download
home_pagehttps://github.com/PeterJCLaw/srcomp-http
SummaryHTTP API for Student Robotics Competition Software
upload_time2024-08-04 17:09:42
maintainerNone
docs_urlNone
authorStudent Robotics Competition Software SIG
requires_python>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            SR Comp HTTP
============

|Build Status| |Docs Status|

A HTTP interface around `SRComp <https://github.com/PeterJCLaw/srcomp/wiki/SRComp>`__,
the fifth round of `Student Robotics <https://studentrobotics.org>`__ competition
software.

This repository provides a JSON API to accessing information about the
state of the competition. It is a lightweight
`Flask <https://palletsprojects.com/p/flask/>`__ application wrapping the
`SRComp <https://github.com/PeterJCLaw/srcomp>`__ python
APIs to the competition state.

Usage
-----

**Install**:

.. code:: shell

    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.

.. code:: python

    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**:

.. code:: shell

    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.


.. |Build Status| image:: https://circleci.com/gh/PeterJCLaw/srcomp-http.svg?style=svg
   :target: https://circleci.com/gh/PeterJCLaw/srcomp-http

.. |Docs Status| image:: https://readthedocs.org/projects/srcomp-http/badge/?version=latest
   :target: https://srcomp-http.readthedocs.org/

.. _`SRComp Dev`: https://github.com/PeterJCLaw/srcomp-dev

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PeterJCLaw/srcomp-http",
    "name": "sr.comp.http",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Student Robotics Competition Software SIG",
    "author_email": "srobo-devel@googlegroups.com",
    "download_url": "https://files.pythonhosted.org/packages/8d/8e/a2585fc1ac1304e37b7c7cc574caeb995bdca4c6e1126e37112b3b27bbdd/sr.comp.http-1.9.0.tar.gz",
    "platform": null,
    "description": "SR Comp HTTP\n============\n\n|Build Status| |Docs Status|\n\nA HTTP interface around `SRComp <https://github.com/PeterJCLaw/srcomp/wiki/SRComp>`__,\nthe fifth round of `Student Robotics <https://studentrobotics.org>`__ competition\nsoftware.\n\nThis repository provides a JSON API to accessing information about the\nstate of the competition. It is a lightweight\n`Flask <https://palletsprojects.com/p/flask/>`__ application wrapping the\n`SRComp <https://github.com/PeterJCLaw/srcomp>`__ python\nAPIs to the competition state.\n\nUsage\n-----\n\n**Install**:\n\n.. code:: shell\n\n    pip install sr.comp.http\n\n**Configuration**\n\nIn deployment you should configure the app by setting the ``COMPSTATE`` key of\nthe app's config to the absolute path of the compstate which the server intends\nto serve.\n\n.. code:: python\n\n    from sr.comp.http import app\n    app.config['COMPSTATE'] = '/path/to/compstate'\n\nDevelopment\n-----------\n\n**Clone**:\n\nFor tests to work, you will need to clone the `tests/dummy` submodule too:\n\n``git submodule update --init``\n\n**Install**:\n\n.. code:: shell\n\n    pip install -e .\n\n**Run**:\n``./run $COMPSTATE``.\n\n**Test**:\n``./run-tests``\n\nDevelopers may wish to use the `SRComp Dev`_ repo to setup a dev instance.\n\nState Caching\n~~~~~~~~~~~~~\n\nSince loading a given state repo takes a non-trivial amount of time,\nthis is cached within the Flask application. Updates to the state repo\nare not tracked directly, and must be signalled by running the\n``./update`` script provided.\n\n\n.. |Build Status| image:: https://circleci.com/gh/PeterJCLaw/srcomp-http.svg?style=svg\n   :target: https://circleci.com/gh/PeterJCLaw/srcomp-http\n\n.. |Docs Status| image:: https://readthedocs.org/projects/srcomp-http/badge/?version=latest\n   :target: https://srcomp-http.readthedocs.org/\n\n.. _`SRComp Dev`: https://github.com/PeterJCLaw/srcomp-dev\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "HTTP API for Student Robotics Competition Software",
    "version": "1.9.0",
    "project_urls": {
        "Code": "https://github.com/PeterJCLaw/srcomp-http",
        "Documentation": "https://srcomp-http.readthedocs.org/",
        "Homepage": "https://github.com/PeterJCLaw/srcomp-http",
        "Issue tracker": "https://github.com/PeterJCLaw/srcomp-http/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "54a806da1ecb0b048aceb87eaa35c5e1246bc19c1e3d9f3548614c73dffd7fbe",
                "md5": "609616cffa948d6d568fe60c608be8be",
                "sha256": "b3e2dd675e824ce1fc774a7b53cfd5713cd16756f8464dcdc9682b6c53e20fb7"
            },
            "downloads": -1,
            "filename": "sr.comp.http-1.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "609616cffa948d6d568fe60c608be8be",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 26789,
            "upload_time": "2024-08-04T17:09:41",
            "upload_time_iso_8601": "2024-08-04T17:09:41.026572Z",
            "url": "https://files.pythonhosted.org/packages/54/a8/06da1ecb0b048aceb87eaa35c5e1246bc19c1e3d9f3548614c73dffd7fbe/sr.comp.http-1.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8d8ea2585fc1ac1304e37b7c7cc574caeb995bdca4c6e1126e37112b3b27bbdd",
                "md5": "3c53110fab2ad95adba45d2ea99cca73",
                "sha256": "b1ecf299bcaff5edaa55e0280e41a2ea4addc95439f423abbb8a25cad7792d39"
            },
            "downloads": -1,
            "filename": "sr.comp.http-1.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3c53110fab2ad95adba45d2ea99cca73",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 24938,
            "upload_time": "2024-08-04T17:09:42",
            "upload_time_iso_8601": "2024-08-04T17:09:42.670946Z",
            "url": "https://files.pythonhosted.org/packages/8d/8e/a2585fc1ac1304e37b7c7cc574caeb995bdca4c6e1126e37112b3b27bbdd/sr.comp.http-1.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-04 17:09:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PeterJCLaw",
    "github_project": "srcomp-http",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "lcname": "sr.comp.http"
}
        
Elapsed time: 0.66234s