All Projects → sYnfo → Yasuf

sYnfo / Yasuf

Licence: other
Very simple way of controlling your Python application via Slack

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Yasuf

Slack Block Builder
Lightweight, no-dependency JavaScript library for creating Slack Block Kit UIs, with a builder syntax, inspired by SwiftUI.
Stars: ✭ 129 (+460.87%)
Mutual labels:  slack, slack-bot
Php Slack Bot
Slack bot user written in PHP
Stars: ✭ 161 (+600%)
Mutual labels:  slack, slack-bot
Norrisbot
a Slack bot that kicks asses (roundhouse-kicks to be accurate...)
Stars: ✭ 134 (+482.61%)
Mutual labels:  slack, slack-bot
Slack Machine
A sexy, simple, yet powerful and extendable Slack bot
Stars: ✭ 91 (+295.65%)
Mutual labels:  slack, slack-bot
Go Sarah
Simple yet customizable bot framework written in Go.
Stars: ✭ 188 (+717.39%)
Mutual labels:  slack, slack-bot
Botonomous
A PHP Framework For Creating Autonomous Slack Bots
Stars: ✭ 109 (+373.91%)
Mutual labels:  slack, slack-bot
Slick
Slick, a Slack bot in Go
Stars: ✭ 150 (+552.17%)
Mutual labels:  slack, slack-bot
Hubcommander
A Slack bot for GitHub organization management -- and other things too
Stars: ✭ 1,149 (+4895.65%)
Mutual labels:  slack, slack-bot
Chatskills
Run and debug Alexa skills on the command-line. Create bots. Run them in Slack. Run them anywhere!
Stars: ✭ 171 (+643.48%)
Mutual labels:  slack, slack-bot
Secret Santa
🎅 The code behind Secret Santa, the holiday bot for Slack / Discord / Zoom
Stars: ✭ 170 (+639.13%)
Mutual labels:  slack, slack-bot
Slacky
🐍 The BEST Slack Selfbot on GitHub | No Bot User, Acts Like It's You! ⭐️
Stars: ✭ 80 (+247.83%)
Mutual labels:  slack, slack-bot
Awesome Bots
The most awesome list about bots ⭐️🤖
Stars: ✭ 2,864 (+12352.17%)
Mutual labels:  slack, slack-bot
Ex mustang
✨ A simple, clueless bot
Stars: ✭ 67 (+191.3%)
Mutual labels:  slack, slack-bot
Slack Sql
🎉 Bring SQL console to Slack
Stars: ✭ 115 (+400%)
Mutual labels:  slack, slack-bot
Jbot
Make Slack and Facebook Bots in Java.
Stars: ✭ 1,148 (+4891.3%)
Mutual labels:  slack, slack-bot
Lita Slack
A Slack adapter for Lita.
Stars: ✭ 138 (+500%)
Mutual labels:  slack, slack-bot
Marvin
The paranoid bot (framework)
Stars: ✭ 51 (+121.74%)
Mutual labels:  slack, slack-bot
Busy Beaver
The Chicago Python Community Engagement Slack bot
Stars: ✭ 66 (+186.96%)
Mutual labels:  slack, slack-bot
Fantasy football chat bot
GroupMe Discord and Slack Chatbot for ESPN Fantasy Football
Stars: ✭ 166 (+621.74%)
Mutual labels:  slack, slack-bot
Sactive Bot
😈 An extensible chat bot framework. sactive-bot is an evolution of the open source hubot project. - https://www.shipengqi.top/sactive-bot .
Stars: ✭ 212 (+821.74%)
Mutual labels:  slack, slack-bot

Build Status

Yasuf — Yet Another Slack, Ummm, Framework

Very simple way of controlling your Python application via Slack.

Yasuf consists of a single, simple decorator that allows you to execute the decorated function via Slack and get it's output back, without modifying the function in any way.

Let's say you have a function say_hello that takes a single integer argument, prints out "Hello!" that many times and returns string describing how many times it has done so:

def say_hello(count):
    for i in range(count):
        print("Hello!")
    return "I've just said Hello! {} times!".format(count)

Controlling this function is as simple as decorating it with the yasuf.handle decorator:

from yasuf import Yasuf

yasuf = Yasuf('slack-token', channel='#general')

The first argument is your token which you can get here and channel specifies the default channel Yasuf will be listening to.

@yasuf.handle('Say hello ([0-9]+) times!', types=[int])
def say_hello(count):
    (...)

The first argument of handle specifies the regexp that the function should respond to, where each capture group corresponds to one argument of the decorated function and types is a list of functions that will be applied to the captured arguments to convert them from string to whatever the decorated function expects.

Now you can run (or run_async).

yasuf.run()

From now on whenever you type Say hello 3 times! Yasuf will response with a couple hellos. Or you can ask Yasuf what he knows with the built-in function 'help'.

Installation

Python 2 and Python3 are supported.

python -m pip install --user yasuf

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].