Skip to main content

Python API for Leitstellenspiel

Project description

LSPAPI

Eine simple API um Daten aus Leitstellenspiel zu erhalten.

Basic usage

from pyLSPAPI import LSPAPI

user = ""  # LSP username
password = ""  # LSP password

key_file = "keyfile.key"  # The file where cookies are saved (for fater second login)
key_file_password = "supersecretpassword"  # encryption password for keyfile

lsp_api = LSPAPI(user, password, key_file, key_file_password)
lsp_api.start()
try:
    # All functions
    print(lsp_api.vehicle_states())
    print(lsp_api.user_stats())
    print(lsp_api.vehicles())
    print(lsp_api.buildings())

finally:
    lsp_api.stop()

Installation

Using pip: pip install pyLSPAPI

List of Functions

vehicle_states()

Returns how many vehicles are in what state.


user_stats()

Returns information about the player.


vehicles()

Returns the vehicles of the player.


buildings()

Returns the buildings of the player.

[!IMPORTANT]

DISCLAIMER

I (the creator of this software) am NOT responsible for any damages done by this program.

[!TIP] If you are an Administrator of Leitstellenspiel and want this repo removed, please submit an issue containing the reason and a link to a Leitstellenspiel Forum post to verify that you are an Administrator. After that The repo will be taken down :)

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

pylspapi-1.0.4.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

pyLSPAPI-1.0.4-py3-none-any.whl (4.3 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