Slack SDK for Python
The official Python SDK for building apps, bots, and integrations on the Slack Platform.
Repository Health
Technical Analysis
slack-sdk is the official Python SDK maintained by Slack for building apps on the Slack Platform. Rather than a single monolithic client, it bundles a set of focused modules for each of Slack’s APIs: a synchronous and asyncio-based Web API client, a legacy RTM client, Socket Mode support, OAuth flow helpers with pluggable installation/token stores, SCIM and Audit Logs clients, and standalone webhook and signature-verification utilities. Each module can be used independently or combined depending on what a given integration needs.
The SDK is widely used across the Slack developer ecosystem for building bots, workflow apps, and internal tooling that posts messages, manages users, or reacts to events. Its OAuth and installation-store abstractions make it a common building block for multi-workspace Slack apps distributed via the Slack App Directory, while the lower-level webhook and signature modules see use in lightweight serverless integrations that only need to verify and respond to Slack events.
What You Get
- A synchronous and an asyncio
WebClient/AsyncWebClientcovering the full Slack Web API surface - Socket Mode and legacy RTM clients for realtime event handling without exposing a public HTTP endpoint
- OAuth flow helpers (
slack_sdk.oauth) with pluggable installation and token stores for multi-workspace apps - SCIM and Audit Logs API clients for enterprise-grid provisioning and compliance use cases
- Standalone
webhookandsignaturemodules for verifying and responding to incoming Slack requests - Built-in HTTP retry handlers and typed request/response models across the API surface
Common Use Cases
- Building Slack bots and workflow apps that post messages, react to events, and manage channels
- Handling OAuth installation flows for Slack apps distributed to multiple workspaces
- Verifying and responding to Slack Events API / interactivity webhooks in serverless functions
- Automating Slack workspace administration via SCIM (user provisioning) or Audit Logs APIs
- Building realtime integrations with Socket Mode when a public HTTPS endpoint isn’t available
Under The Hood
Architecture - The SDK is organized as a set of independent client modules under slack_sdk/ (web/, rtm/, rtm_v2/, socket_mode/, oauth/, scim/, audit_logs/, webhook/, signature/), each usable on its own without pulling in the others. The Web API layer splits base_client.py/client.py (sync) from async_base_client.py/async_client.py (asyncio), sharing request-building logic through a common base class, while slack_response.py/async_slack_response.py wrap raw HTTP responses in a dict-like, paginated response object. OAuth support (oauth/installation_store/) is built around a pluggable store interface so apps can swap in-memory, file, SQLAlchemy, or custom persistence for installation/token data without touching the OAuth flow logic itself.
Tech Stack - Pure Python (per GitHub’s language stats) supporting Python 3.7+, with aiohttp as the optional dependency for the async client and Socket Mode’s websocket transport (topics include aiohttp, aiohttp-client, asyncio, websocket-client). Packaging uses a pyproject.toml with dynamic version/readme/optional-dependencies resolved via setup.cfg, and CI runs through GitHub Actions with Codecov coverage reporting, reflecting Slack’s own maintenance of the package (top contributor seratch is a Slack engineer).
Code Quality - The tests/ tree mirrors the source layout almost 1:1 (tests/slack_sdk/web, tests/slack_sdk/oauth, tests/slack_sdk_async/..., tests/webhook, tests/signature), with 118 test files and a dedicated mock_web_api_server fixture directory for testing HTTP client behavior without hitting real Slack endpoints. Both sync and async code paths get parallel test coverage (tests/slack_sdk vs tests/slack_sdk_async), and the project ships an AGENTS.md plus SECURITY.md, indicating active maintenance practices beyond just code.
API Design - The SDK favors one client class per concern (WebClient, SocketModeClient, WebhookClient, SignatureVerifier) over a single do-everything object, so integrators only import what they need. Method names on WebClient map directly to Slack Web API method names (e.g. chat_postMessage), which keeps the SDK easy to cross-reference against Slack’s own API docs at the cost of not fully conforming to Python naming conventions — a deliberate trade-off favoring API discoverability.
Used by 11 apps in this directory
Apache Airflow
Data Engineering
Define, schedule, and monitor complex data workflows as Python code — with a powerful UI, 80+ provider integrations, and battle-tested scalability across thousands of production deployments.
AutoGPT
Automation · Productivity · AI Assistants
Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.
Elementary
Data Engineering · Monitoring · Analytics
The dbt-native data observability CLI that turns your existing dbt tests and metadata into anomaly detection, lineage graphs, and Slack/Teams alerts — no separate platform required.
Flagsmith
Developer Tools · Devops · Ab Testing Experimentation
Open-source feature flagging, remote config, and A/B/multivariate testing platform for web, mobile, and server-side apps — self-host or use the hosted SaaS.
OpenHands
AI Code Assistants · AI Development
The self-hosted developer control center for running AI coding agents — locally, in Docker, on VMs, or across cloud backends — with automation workflows for GitHub, Slack, and more.
OpenViking
Databases · AI Development
An open-source context database that gives AI agents a unified filesystem for memory, resources, and skills with hierarchical tiered retrieval.
PostHog
Analytics · Monitoring · Developer Tools
The all-in-one open source product platform combining analytics, session replay, feature flags, error tracking, AI observability, and a built-in data warehouse in a single self-hostable stack.
Rasa Open Source
AI Assistants · AI Development
Rasa Open Source is a Python machine learning framework for building contextual, multi-turn chatbots and voice assistants that understand natural language and maintain conversation state.
Sentry
Security · Developer Tools · Monitoring
Developer-first error tracking and performance monitoring platform with AI-powered root-cause analysis across 20+ languages and frameworks.