Giter VIP home page Giter VIP logo

pyvrageremoteapi's Introduction

pyvrageremoteapi

Python implementation for the VRage Remote API by Keen Software House, as documented under [https://www.spaceengineersgame.com/dedicated-servers.html].

Tested with Space Engineers 1.194.083, should work with Medieval Engineers as well.

Can be called via commandline (see below) or imported as module.

Currently, only GET operations are supported. Feel free to submit a Pull Request or an issue.

Usage

usage: vrageremoteapi.py [-h] --url URL --key KEY --resource RESOURCE

-h, --help           show this help message and exit
--url URL            of the remote server, e.g. http://localhost:8080
--key KEY            secret key for the remote API, e.g.
                      XKb8xk7vrKaq+BpallYnGA==
--resource RESOURCE  resource to be fetched, e.g. server/ping

The result is presented as JSON string.

For example:

> python3 vrageremoteapi.py --url http://localhost:8080 --key XKb8xk7vrKaq+BpallYnGA== --resource server/ping
{'data': {'Result': 'Pong'}, 'meta': {'apiVersion': '1.0', 'queryTime': 0.3032}}

Example

For demonstration purposes, see spaceengineersmetrics.py, which fetches fetches current information from a given server and puts it into an InfluxDB. Using this, you can keep track of the performance of your server and visualize statistics.

Should be called regularly, i.e. via crontab.

Usage:

python3 spaceengineersmetrics.py --url http://localhost:8080 --key XKb8xk7vrKaq+BpallYnGA== --db_host localhost

Example for visualisation in Grafana

pyvrageremoteapi's People

Contributors

dl1com avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.