Skip to main content

Rising Storm 2: Vietnam WebAdmin Python Interface

Project description

rs2wapy

Discord

Rising Storm 2: Vietnam WebAdmin Python Interface

Provides a Python interface for performing RS2 WebAdmin tasks programmatically.

The library uses PycURL internally to communicate with RS2 WebAdmin.

Work in progress; interface will change!

Brief Usage Examples

This section contains some brief usage examples. For more comprehensive tutorials check out the examples repository.

Installation
# Requires Python=>3.7
pip install rs2wapy
Steam Web API key (optional)

Setting your Steam Web API key as an environment variable allows rs2wapy to offer some extra functionality.

Unix:

export STEAM_WEB_API_KEY="TOPSECRETKEY"

Windows:

set STEAM_WEB_API_KEY="TOPSECRETKEY"
Quickstart

It is recommended to create a new WebAdmin account for rs2wapy.

from rs2wapy import RS2WebAdmin

wa = RS2WebAdmin(
    username="AutoModerator",
    password="topsecret123",
    webadmin_url="http://localhost:8080/",
)
Poll server ranked status and switch map automatically
while True:
    if not wa.get_current_game().ranked:
        wa.post_chat_message("Unranked bug happened! Changing map in 5 seconds!")
        time.sleep(5)
        wa.change_map("VNTE-Resort")
    time.sleep(1)

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

rs2wapy-0.5.26.tar.gz (37.5 kB view hashes)

Uploaded Source

Built Distribution

rs2wapy-0.5.26-py3-none-any.whl (24.2 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