Slack SDK for Python

The official Python SDK for building apps, bots, and integrations on the Slack Platform.

SDK
PyPI
v3.44.1
4,016 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
96 /100 Excellent
Development Activity 96
Maintenance 96
Community 92
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
80 /100 Excellent
Architecture 85
Code Quality 84
Innovation 78
Learning Curve 72

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/AsyncWebClient covering 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 webhook and signature modules 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 13 apps in this directory

Python
100%
Apache 2.0

Agno

AI Development · Automation · Devops

42,358

Build, run, and manage agent platforms with a full production stack — SDK, runtime, and control plane included.

View details
93
Repo Health
87
Technical
66
Dependency
Built with
Python 100%
Updated 4 days ago
Python
89%
Apache 2.0

Apache Airflow

Data Engineering

46,995

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.

View details
96
Repo Health
89
Technical
64
Dependency
Built with
Python 89%
Updated 4 days ago
Python
66%
Other

AutoGPT

AI Assistants · Automation · Productivity

187,596

Build, deploy, and run autonomous AI agents that automate complex multi-step workflows using a visual block-based graph editor.

View details
93
Repo Health
78
Technical
66
Dependency
Built with
Python 66%
TypeScript 33%
Updated 4 days ago
Python
100%
Apache 2.0

ClearML

Automation · Devops

6,892

Auto-magical MLOps platform that tracks experiments, versions data, orchestrates pipelines, and serves models with just two lines of code.

View details
94
Repo Health
79
Technical
68
Dependency
Built with
Python 100%
Updated 1 weeks ago
HTML
85%
Apache 2.0

Elementary

Analytics · Data Engineering · Monitoring

2,414

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.

View details
81
Repo Health
75
Technical
79
Dependency
Built with
HTML 85%
Python 15%
Updated 5 days ago
Python
63%
BSD 3

Flagsmith

Ab Testing Experimentation · Developer Tools · Devops

6,577

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.

View details
90
Repo Health
82
Technical
63
Dependency
Built with
Python 63%
TypeScript 31%
Updated 6 days ago
TypeScript
95%
Other

OpenHands

AI Code Assistants · AI Development

89,328

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.

View details
91
Repo Health
82
Technical
67
Dependency
Built with
TypeScript 95%
Updated 5 days ago
Python
75%
AGPL 3.0

OpenViking

AI Development · AI Memory · Databases

38,819

An open-source context database that gives AI agents a unified filesystem for memory, resources, and skills with hierarchical tiered retrieval.

View details
85
Repo Health
75
Technical
64
Dependency
Built with
Python 75%
Rust 12%
Updated 4 days ago
Python
55%
Other

PostHog

Ab Testing Experimentation · Analytics · Developer Tools

39,975

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.

View details
92
Repo Health
80
Technical
65
Dependency
Built with
Python 55%
TypeScript 36%
Updated 4 days ago

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