A Python Jupyter Kernel in Slack. Just send Python code as a message.

Overview

Slack IPython bot 🤯

One Slack bot to rule them all. PyBot. Just send Python code as a message.

PyBot demo

Install

pip install slack-ipython

PyPI

To start the bot, simply run:

slack-ipython

For detailed output, add DEBUG=true as an environment variable.

Create a .env (or set these environment variables yourself).

SLACK_APP_TOKEN="xapp-..."
SLACK_BOT_TOKEN="xoxb-..."
APPROVED_SLACK_MEMBER_IDS="U01LXXXXXX,U01LXXXXXXX"

Security warning: this effectively gives full access to wherever you run this. Make sure you only add Slack member IDs of people you trust.

Deploy on Heroku

Deploy on Heroku

Configure your Slack app

First create a new Slack app in the Slack app dashboard.

Your Slack app needs to have:

  • [Settings -> Basic Information -> App-Level Tokens]
    • Create a bot token
      • connections:write
    • (Optional) configure app icon.
  • [Settings -> Socket Mode]
    • Socket mode enabled
  • [Features -> App Home]
    • Messages Tab enabled
  • [Features -> App Home -> Show Tabs]
    • "Allow users to send Slash commands and messages from the messages tab" enabled
  • [Features -> OAuth & Permissions -> Scopes]
    • The following OAuth scopes
      • chat:write
      • files:write
      • im:history
      • im:read
      • im:write
  • [Features -> Event Subscriptions]
    • Events enabled
    • Subscribed to bot events
      • message.im

Or use the App Manifest slack_app.yaml.

Make sure you install the Slack app in your workspace after configuring the above.

You might also like...
A discord program that will send a message to nearly every user in a discord server
A discord program that will send a message to nearly every user in a discord server

Discord Mass DM Scrapes users from a discord server to promote/mass dm Report Bug · Request Feature Features Asynchronous Easy to use Free Auto scrape

A Telegram AntiChannel bot to ban users who using channel to send message in group

Anti-Channel-bot A Telegram AntiChannel bot to ban users who using channel to send message in group. BOT LINK: Features: Automatic ban Whitelist Unban

A Bot Telegram Anti Users Channel to automatic ban users who using channel to send message in group.

Tg_Anti_UsersChannel A Bot Telegram Anti Users Channel to automatic ban users who using channel to send message in group. Features: Automatic ban Whit

A Dm Bot, also knows as Mass DM bot which can send one message to All of the Users in a Specific Server!
A Dm Bot, also knows as Mass DM bot which can send one message to All of the Users in a Specific Server!

Discord DM Bot discord.py 1.7.2 python 3.9.5 asyncio 3.4.3 Installation Cloud Host Tutorial uploaded in YouTube, watch it by clicking here. Local Host

Automatically send commands to send Twitch followers to any Twitch account.
Automatically send commands to send Twitch followers to any Twitch account.

Automatically send commands to send Twitch followers to any Twitch account. You just need to be in a Twitch follow bot Discord server!

Full-featured Python interface for the Slack API

This repository is archived and will not receive any updates It's time to say goodbye. I'm archiving Slacker. It's been getting harder to find time to

A Flask inspired, decorator based API wrapper for Python-Slack.

A Flask inspired, decorator based API wrapper for Python-Slack. About Tangerine is a lightweight Slackbot framework that abstracts away all the boiler

Slack Developer Kit for Python

Python Slack SDK The Slack platform offers several APIs to build apps. Each Slack API delivers part of the capabilities from the platform, so that you

As Slack no longer provides an API to invite people, this is a Selenium Python script to do so

As Slack no longer provides an API to invite people, this is a Selenium Python script to do so

Owner
Rick Lamers
Co-Founder of Orchest. I like open source, building software, reading papers and generally working with optimistic people!
Rick Lamers
This automation protect against subdomain takeover on AWS env which also send alerts on slack.

AWS_Subdomain_Takeover_Detector Purpose The purpose of this automation is to detect misconfigured Route53 entries which are vulnerable to subdomain ta

Puneet Kumar Maurya 8 May 18, 2022
Send Informative, Concise Slack Notifications With Minimal Effort

slack-templates Send Informative, Concise Slack Notifications With Minimal Effort slack-templates Slack Integration Available Templates Usage Report t

null 9 Nov 3, 2022
A Python interface module to the SAS System. It works with Linux, Windows, and mainframe SAS. It supports the sas_kernel project (a Jupyter Notebook kernel for SAS) or can be used on its own.

A Python interface to MVA SAS Overview This module creates a bridge between Python and SAS 9.4. This module enables a Python developer, familiar with

SAS Software 319 Dec 19, 2022
Karen is a Discord Bot that will check for a list of forbidden words/expressions, removing the message that contains them and replying with another message.

Karen is a Discord Bot that will check for a list of forbidden words/expressions, removing the message that contains them and replying with another message. Everything is highly customizable.

Rafael Almeida 1 Nov 3, 2021
To send an Instagram message using Python

To send an Instagram message using Python, you must have an Instagram account and install the Instabot library in your Python virtual environment.

Coding Taggers 1 Dec 18, 2021
Simple software that can send WhatsApp message to a single or multiple users (including unsaved number**)

wp-automation Info: this is a simple automation software that sends WhatsApp message to single or multiple users. Key feature: -Sends message to multi

null 3 Jan 31, 2022
Demo of using Telegram to send alert message

MIAI_Telegram Demo of using Telegram to send alert message Video link: https://youtu.be/oZ9CsIrlMgg #MìAI Fanpage: http://facebook.com/miaiblog Group

null 4 Jun 20, 2021
Bill is a bot capable to Chat with you, search everything on web to you, and send message to yours contacts for you.

Bill Bot The inteligent Bot Bill is a intelligent bot, it can chat, search and send messages to you. Chat with You Send messages on WhatsApp for you S

João Assalim 3 Sep 12, 2021
A stock information collector and parser for Taiwan and US market. Automatically send LINE message if the pre-defined rules are triggered.

agastock 開發動機 就在海運飆漲的2021年7月,差點跪在地上喜迎財富自由的當下,EPS超高好消息不斷的長榮竟然套在202元一去不回,有圖有真相(哭) 忽然體會到追高殺低不是辦法,魯蛇我得靠邏輯分析也能出頭天,經過三個月無數個不出門的周末,產出簡單的爬蟲和分析工具。 上過金融研訓院的量化交易

Gavin Lee 12 Nov 16, 2022