robo
Dead simple bot framework which is inspired by Ruby’s ruboty.
Why reinvent the wheel
I Love Python and I’m not good at Node.js(hubot), Ruby(Ruboty).
Err is pluggable but it’s too complex for me.
brutal is also pluggable but I don’t wont to write config file.
So I reinvent the wheel.
Architecture
Message flow.
+--[handler a]--+
| |
[chat service]-->[adapter]--+--[handler b]--+--[adapter]-->[chat service]
| |
+--[handler c]--+
Adapter
Adapter is interface of chat services receive message and send message to chat service.
Robo includes two adapters.
Handler
Handler provides various behaviors to your robot.
from robo.decorators import cmd
class Ping(object):
@cmd(regex=r'^ping', description='')
def pong(self, message, **kwargs):
return 'pong'
This handler matches message ping and return pong to chat service.
Bootstrap
example/main.py is a example of bootstraping robo.
def main(args=None):
#: `name` is bot's name.
#: This arg is trigger of handler.
robot = Robot(name=args.name, logger=logger)
#: `register_default_handlers()` register default handlers.
#: Default handlers are `help`, `ping`, `echo`.
robot.register_default_handlers()
#: Load given adapter name.
robot.load_adapter(args.adapter)
#: Run robot
robot.run(args.adapter)
Metadata
Release files for robo 0.5.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| robo-0.5.6.tar.gz | 10.6 kB | Without provenance | Details for robo-0.5.6.tar.gz |
Release files / robo-0.5.6.tar.gz
| Download URL | robo-0.5.6.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21502ef55d3e03aecd04de27c1dd33f6fd7f7d3d886dd7ca49a1b919e59e6444
|
|
BLAKE2b-256 checksum How to use checksums |
0b1a37f6a0c6ed30b8af7f3e600dbc95540d03ceb962e4e00180e5f70535ecb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for robo 0.5.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.