Slack SDK for Python

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

SDK
PyPI
v3.43.0
4,014stars
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
Maintenance96
Community92
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
80/100Excellent
Architecture85
Code Quality84
Innovation78
Learning Curve72

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 11 apps in this directory

Python
90%
Apache 2.0

Apache Airflow

Data Engineering

46,530

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
66
Dependency
Built with
Python90%
Updated today
Python
68%
Other

AutoGPT

Automation · Productivity · AI Assistants

186,687

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
67
Dependency
Built with
Python68%
TypeScript31%
Updated today
HTML
85%
Apache 2.0

Elementary

Data Engineering · Monitoring · Analytics

2,393

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
89
Repo Health
75
Technical
79
Dependency
Built with
HTML85%
Python15%
Updated yesterday
Python
64%
BSD 3

Flagsmith

Developer Tools · Devops · Ab Testing Experimentation

6,518

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
91
Repo Health
82
Technical
65
Dependency
Built with
Python64%
TypeScript31%
Updated today
TypeScript
94%
Other

OpenHands

AI Code Assistants · AI Development

84,452

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
71
Dependency
Built with
TypeScript94%
Updated today
Python
74%
AGPL 3.0

OpenViking

Databases · AI Development

29,711

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

View details
84
Repo Health
75
Technical
65
Dependency
Built with
Python74%
Rust14%
Updated today
Python
55%
Other

PostHog

Analytics · Monitoring · Developer Tools

37,777

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
67
Dependency
Built with
Python55%
TypeScript36%
Updated today
Python
99%
Apache 2.0

Rasa Open Source

AI Assistants · AI Development

21,295

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.

View details
67
Repo Health
78
Technical
64
Dependency
Built with
Python99%
Updated 3 weeks ago
Python
58%
Other

Sentry

Security · Developer Tools · Monitoring

44,574

Developer-first error tracking and performance monitoring platform with AI-powered root-cause analysis across 20+ languages and frameworks.

View details
95
Repo Health
80
Technical
70
Dependency
Built with
Python58%
TypeScript41%
Updated today

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