Skip to main content

Echo VR API

Python bindings for Echo VR's HTTP API.

Installation

If you haven't already, install Python 3 and Pipenv.

Now, in your project directory, run:

pipenv install echovr-api

Usage

Basic usage example:

from requests.exceptions import ConnectionError
import json
import echovr_api

try:
    game_state = echovr_api.fetch_state()

    print(f"Game status: {game_state.game_status}")
    print(f"Seconds on clock: {game_state.game_clock}")

    if (game_state.blue_team.score > game_state.orange_team.score):
        print("Blue team is winning!")
    elif (game_state.orange_team.score > game_state.blue_team.score):
        print("Orange team is winning!")
    else:
        print("It's tied!")

    print(f"Score: {game_state.blue_team.score} - {game_state.orange_team.score}")

except ConnectionError as e:
    print("Connection refused. Make sure you're running Echo VR with the -http option and that you're in a match.")
except json.decoder.JSONDecodeError as e:
    print("Could not decode response. (Not valid JSON.)")

For comprehensive documentation of the available methods and classes, please see the full API Documentation on Read The Docs.

Contributing

To get everything you need to start making changes to this package, first install Python 3 and Pipenv, clone this repository, then run:

pipenv install

Try it

To play around with the API, open an instance of Echo VR with the -http flag, then run:

pipenv run python -i ./test.py

Release process

First, update CHANGELOG.md and the version number in setup.py and docs/source/conf.py. Then commit, tag, and push these changes.

Next, build the package:

pipenv install --dev
pipenv run python setup.py sdist bdist_wheel

Finally, upload the built packages to PyPi. You can do this using twine (pip install twine):

twine upload dist/*

Metadata

Release files for echovr-api 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for echovr-api 0.2.0
File Size Uploaded Provenance
echovr_api-0.2.0.tar.gz 9.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for echovr-api 0.2.0
File Interpreter ABI Platform
echovr_api-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.8 kB

Release files / echovr_api-0.2.0.tar.gz

Download URL echovr_api-0.2.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4a65e46d2a2d7788fe2bc3d5a05a18baebe078da554941e57cd07bc45336b44a
BLAKE2b-256 checksum
How to use checksums
98a8fab2721f0c24abfb3f3a33c93527b6ce5f51bfb40fbd1c306388e3fef726
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

Release files / echovr_api-0.2.0-py3-none-any.whl

Download URL echovr_api-0.2.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c3986ba5973be25f5e3c871f047bc32e95a4a60cd3333cf5540ccf7c0746c8f
BLAKE2b-256 checksum
How to use checksums
4779901c7746742414c120562c4185dbe4df112b8f5385789b09f447c6e5137e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

Security for echovr-api 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page