Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

The Bolt Framework for Python

Project description

⚠️ Important Notice ⚠️

🔄 Still Work In Progress 🔄

This project is still in alpha, and may have bugs in it. Also, the public APIs can be changed until the v1 release. We are keen to hear your feedback. Please feel free to submit an issue!

Bolt for Python (still in alpha)

A Python framework to build Slack apps in a flash with the latest platform features. Check the samples to know how to use this framework.


python -m venv env
source env/bin/activate
pip install slack_bolt

First Bolt App (

Create an app by calling a constructor, which is a top-level export.

import logging

from slack_bolt import App

# export SLACK_BOT_TOKEN=xoxb-***
app = App()

# Middleware
@app.middleware  # or app.use(log_request)
def log_request(logger, payload, next):
    return next()

# Events API:
def event_test(say):
    say("What's up?")

# Interactivity:
# @app.command("/hello-bolt-python")
def open_modal(ack, client, logger, payload):
    # acknowledge the incoming request from Slack immediately
    # open a modal
    api_response = client.views_open(
            "type": "modal",
            "callback_id": "view-id",
            "title": {
                "type": "plain_text",
                "text": "My App",
            "submit": {
                "type": "plain_text",
                "text": "Submit",
            "blocks": [
                    "type": "input",
                    "block_id": "b",
                    "element": {
                        "type": "plain_text_input",
                        "action_id": "a"
                    "label": {
                        "type": "plain_text",
                        "text": "Label",

def view_submission(ack, payload, logger):
    # Prints {'b': {'a': {'type': 'plain_text_input', 'value': 'Your Input'}}}["view"]["state"]["values"])

if __name__ == "__main__":
    app.start(3000)  # POST http://localhost:3000/slack/events

Run the Bolt App

export SLACK_BOT_TOKEN=xoxb-***

# in another terminal
ngrok http 3000


We are keen to hear your feedback. Please feel free to submit an issue!


The MIT License

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for slack-bolt, version 0.2.1a0
Filename, size File type Python version Upload date Hashes
Filename, size slack_bolt-0.2.1a0-py2.py3-none-any.whl (73.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size slack_bolt-0.2.1a0.tar.gz (36.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page