Bolt for Python

Slack's official Python framework for building Slack apps fast, with routing, middleware, and Socket Mode across many web stacks.

Framework
PyPI
v1.30.0
1,321stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
97/100Excellent
Development Activity100
Maintenance100
Community88
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
87/100Excellent
Architecture90
Code Quality90
Innovation88
Learning Curve80

Bolt for Python (slack-bolt) is Slack’s official framework for building Slack apps with the latest platform features. It gives you a single App object that receives Slack events, actions, slash commands, shortcuts, and view submissions, then routes each to the handler you register, so you write listener functions instead of wiring up HTTP endpoints and signature verification by hand.

Bolt handles request verification, middleware, OAuth installation, and both HTTP and Socket Mode connection styles, and it adapts to popular Python web frameworks including Flask, FastAPI, Django, and aiohttp. Sync and async variants are both first-class, letting teams build anything from a simple bot to a distributed, installable Slack app on the stack they already use.

What You Get

  • An App object that routes Slack events, actions, commands, shortcuts, and views to your listeners
  • Automatic request signature verification and Slack API client wiring
  • Middleware support for cross-cutting logic like auth and logging
  • Socket Mode and HTTP adapters, plus OAuth installation handling
  • Adapters for Flask, FastAPI, Django, aiohttp, and other Python web frameworks, in sync and async forms

Common Use Cases

  • Building a Slack bot that responds to messages, commands, and buttons
  • Creating an installable, multi-workspace Slack app with OAuth
  • Adding Slack interactivity to an existing Flask, FastAPI, or Django service

Under The Hood

Architecture Bolt centers on the App (and AsyncApp) object in the slack_bolt package, which receives a normalized request, runs it through a global and listener-specific middleware chain, matches it against registered listeners by type and constraints, and invokes your handler with injected arguments (body, say, ack, client, context). Adapter modules translate between Bolt’s internal request/response and each web framework or Socket Mode transport.

Tech Stack Python 3.7+ built on the slack_sdk client, with optional integrations pulling in Flask, FastAPI, Django, aiohttp, and websocket libraries as needed. Both synchronous and asyncio-based implementations are maintained in parallel, and packaging uses setuptools with framework extras.

Code Quality This is a mature, heavily tested codebase: 178 Python test files exercise listeners, middleware, adapters, OAuth, and Socket Mode, with Codecov tracking coverage and CI enforcing quality. As Slack’s official SDK it follows disciplined release and security practices.

API Design The developer experience is a core strength: a decorator such as @app.event("app_mention") or @app.command("/deploy") registers a handler, and Bolt injects exactly the utilities that handler needs. The same mental model works across sync and async and across every supported framework, so moving between stacks requires almost no relearning.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search