Skip to main content

slimelearn.py version

Project description

slimelearn.py

A very easy to use API wrapper for SlimeLearn written in Python.

Installing

Python 3.9.1 or higher is required

To install the library:

pip install slimelearnpy

Client Example

The following code recives updates from the server every 3 seconds, and executes a jump if the player is ready to do so.

from slimelearnpy import SlimeLearn

sl = SlimeLearn()

conf = {
    "req": "config",
    "payload": {
        "mode": "sec",
        "delay": 3,
    }
}

def my_agent(input_data):
    
    if input_data["player"]["state"] == 'idle':
        sl.jump()

sl.run("//localhost:8080", config=conf, function=my_agent)

More examples can be found in the examples folder.

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

slimelearnpy-0.8.3.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

slimelearnpy-0.8.3-py3-none-any.whl (3.8 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