RainBot Module Library for Python
Project description
Proper documentation and specifications will be coming with RainBot v0.5.0 (This includes a working link to library web page)
To install
pip install pyrml
To generate a simple scaffold (assuming rainbot is installed)
rainbot -m py YourModuleName
Example Usage
#### Simple
from pyrml import Module
m = Module("Echo", "A simple echo module")
@m.command("echo")
def echo(msg, args):
m.say(msg["Params"][0], " ".join(args))
m.register()
from pyrml import Module
class Echo(Module):
def __init__(self, name, desc):
Module.__init__(self, name, desc)
def echo(self, msg, args):
self.say(msg["Args"][0], " ".join(args))
if __name__ == '__main__':
m = Echo("Echo", "An echo mdoule")
m.add_command("echo", {
"Help": "Repeats arguments",
"Fun": m.echo
})
m.register()
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
pyrml-0.5.1.zip
(4.3 kB
view details)
File details
Details for the file pyrml-0.5.1.zip.
File metadata
- Download URL: pyrml-0.5.1.zip
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8329bb67cedb4c3e4fe00f5ffb0204f319a3d9f4b00d68aebbb059e4094f29b8
|
|
| MD5 |
9af91a733824604f1f175c21e675fb01
|
|
| BLAKE2b-256 |
6bf5d963c3393af7b02d1b33bbd76c60b1b093b2f22c0b5bb5a574182e1791c6
|