[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-77360":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":17,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":21,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":44,"readmeContent":45,"aiSummary":46,"trendingCount":16,"starSnapshotCount":16,"syncStatus":47,"lastSyncTime":48,"discoverSource":49},77360,"bolt-python","slackapi\u002Fbolt-python","slackapi","A framework to build Slack apps using Python","https:\u002F\u002Fdocs.slack.dev\u002Ftools\u002Fbolt-python\u002F",null,"Python",1309,292,29,24,0,1,6,20.4,"MIT License",false,"main",true,[25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"aiohttp","aiohttp-client","asyncio","bolt","chatbot","chatops","django","docker","fastapi","flask","pypi-url","python","slack","slack-api","socket-mode","web-api","websocket","websocket-client","websockets","2026-06-12 02:03:42","\u003Ch1 align=\"center\">Bolt \u003Cimg src=\"https:\u002F\u002Fdocs.slack.dev\u002Fimg\u002Flogos\u002Fbolt-py-logo.svg\" alt=\"Bolt logo\" width=\"32\"\u002F> for Python\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fslack-bolt\u002F\">\n        \u003Cimg alt=\"PyPI - Version\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Fslack-bolt\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fcodecov.io\u002Fgh\u002Fslackapi\u002Fbolt-python\">\n        \u003Cimg alt=\"Codecov\" src=\"https:\u002F\u002Fimg.shields.io\u002Fcodecov\u002Fc\u002Fgh\u002Fslackapi\u002Fbolt-python\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpepy.tech\u002Fproject\u002Fslack-bolt\">\n        \u003Cimg alt=\"Pepy Total Downloads\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpepy\u002Fdt\u002Fslack-bolt\">\u003C\u002Fa>\n    \u003Cbr>\n    \u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Fslack-bolt\u002F\">\n        \u003Cimg alt=\"Python Versions\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fslack-bolt.svg\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fdocs.slack.dev\u002Ftools\u002Fbolt-python\u002F\">\n        \u003Cimg alt=\"Documentation\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdev-docs-yellow\">\u003C\u002Fa>\n\u003C\u002Fp>\n\nA Python framework to build Slack apps in a flash with the latest platform features. Read the [getting started guide](https:\u002F\u002Fdocs.slack.dev\u002Ftools\u002Fbolt-python\u002Fgetting-started) and look at our [code examples](https:\u002F\u002Fgithub.com\u002Fslackapi\u002Fbolt-python\u002Ftree\u002Fmain\u002Fexamples) to learn how to build apps using Bolt. The Python module documents are available [here](https:\u002F\u002Fdocs.slack.dev\u002Ftools\u002Fbolt-python\u002Freference\u002F).\n\n## Setup\n\n```bash\n# Python 3.7+ required\npython -m venv .venv\nsource .venv\u002Fbin\u002Factivate\n\npip install -U pip\npip install slack_bolt\n```\n\n## Creating an app\n\nCreate a Bolt for Python app by calling a constructor, which is a top-level export. If you'd prefer, you can create an [async app](#creating-an-async-app).\n\n```python\nimport logging\nlogging.basicConfig(level=logging.DEBUG)\n\nfrom slack_bolt import App\n\n# export SLACK_SIGNING_SECRET=***\n# export SLACK_BOT_TOKEN=xoxb-***\napp = App()\n\n# Add functionality here\n\nif __name__ == \"__main__\":\n    app.start(3000)  # POST http:\u002F\u002Flocalhost:3000\u002Fslack\u002Fevents\n```\n\n## Running an app\n\n```bash\nexport SLACK_SIGNING_SECRET=***\nexport SLACK_BOT_TOKEN=xoxb-***\npython app.py\n\n# in another terminal\nngrok http 3000\n```\n\n## Running a Socket Mode app\n\nIf you use [Socket Mode](https:\u002F\u002Fdocs.slack.dev\u002Fapis\u002Fevents-api\u002Fusing-socket-mode\u002F) for running your app, `SocketModeHandler` is available for it.\n\n```python\nimport os\nfrom slack_bolt import App\nfrom slack_bolt.adapter.socket_mode import SocketModeHandler\n\n# Install the Slack app and get xoxb- token in advance\napp = App(token=os.environ[\"SLACK_BOT_TOKEN\"])\n\n# Add functionality here\n\nif __name__ == \"__main__\":\n    # Create an app-level token with connections:write scope\n    handler = SocketModeHandler(app, os.environ[\"SLACK_APP_TOKEN\"])\n    handler.start()\n```\n\nRun the app this way:\n\n```bash\nexport SLACK_APP_TOKEN=xapp-***\nexport SLACK_BOT_TOKEN=xoxb-***\npython app.py\n\n# SLACK_SIGNING_SECRET is not required\n# Running ngrok is not required\n```\n\n## Listening for events\n\nApps typically react to a collection of incoming events, which can correspond to [Events API events](https:\u002F\u002Fdocs.slack.dev\u002Fapis\u002Fevents-api\u002F), [actions](https:\u002F\u002Fdocs.slack.dev\u002Fblock-kit\u002F#making-things-interactive), [shortcuts](https:\u002F\u002Fdocs.slack.dev\u002Finteractivity\u002Fimplementing-shortcuts\u002F), [slash commands](https:\u002F\u002Fdocs.slack.dev\u002Finteractivity\u002Fimplementing-slash-commands\u002F) or [options requests](https:\u002F\u002Fdocs.slack.dev\u002Freference\u002Fblock-kit\u002Fblock-elements\u002Fselect-menu-element#external_select). For each type of\nrequest, there's a method to build a listener function.\n\n```python\n# Listen for an action from a Block Kit element (buttons, select menus, date pickers, etc)\napp.action(action_id)(fn)\n\n# Listen for dialog submissions\napp.action({\"callback_id\": callbackId})(fn)\n\n# Listen for slash commands\napp.command(command_name)(fn)\n\n# Listen for an event from the Events API\napp.event(event_type)(fn)\n\n# Listen for a custom step execution from a workflow\napp.function(callback_id)(fn)\n\n# Convenience method to listen to only `message` events using a string or re.Pattern\napp.message([pattern ,])(fn)\n\n# Listen for options requests (from select menus with an external data source)\napp.options(action_id)(fn)\n\n# Listen for a global or message shortcuts\napp.shortcut(callback_id)(fn)\n\n# Listen for view_submission modal events\napp.view(callback_id)(fn)\n```\n\nThe recommended way to use these methods are decorators:\n\n```python\n@app.event(event_type)\ndef handle_event(event):\n    pass\n```\n\n## Making things happen\n\nMost of the app's functionality will be inside listener functions (the `fn` parameters above). These functions are called with a set of arguments, each of which can be used in any order. If you'd like to access arguments off of a single object, you can use `args`, an [`slack_bolt.kwargs_injection.Args`](https:\u002F\u002Fgithub.com\u002Fslackapi\u002Fbolt-python\u002Fblob\u002Fmain\u002Fslack_bolt\u002Fkwargs_injection\u002Fargs.py) instance that contains all available arguments for that event.\n\n| Argument  | Description  |\n| :---: | :--- |\n| `body` | Dictionary that contains the entire body of the request (superset of `payload`). Some accessory data is only available outside of the payload (such as `trigger_id` and `authorizations`).\n| `payload` | Contents of the incoming event. The payload structure depends on the listener. For example, for an Events API event, `payload` will be the [event type structure](https:\u002F\u002Fdocs.slack.dev\u002Fapis\u002Fevents-api\u002F#event-type-structure). For a block action, it will be the action from within the `actions` list. The `payload` dictionary is also accessible via the alias corresponding to the listener (`message`, `event`, `action`, `shortcut`, `view`, `command`, or `options`). For example, if you were building a `message()` listener, you could use the `payload` and `message` arguments interchangably. **An easy way to understand what's in a payload is to log it**. |\n| `context` | Event context. This dictionary contains data about the event and app, such as the `botId`. Middleware can add additional context before the event is passed to listeners.\n| `ack` | Function that **must** be called to acknowledge that your app received the incoming event. `ack` exists for all actions, shortcuts, view submissions, slash command and options requests. `ack` returns a promise that resolves when complete. Read more in [Acknowledging events](https:\u002F\u002Fdocs.slack.dev\u002Ftools\u002Fbolt-python\u002Fconcepts\u002Facknowledge\u002F).\n| `respond` | Utility function that responds to incoming events **if** it contains a `response_url` (shortcuts, actions, and slash commands).\n| `say` | Utility function to send a message to the channel associated with the incoming event. This argument is only available when the listener is triggered for events that contain a `channel_id` (the most common being `message` events). `say` accepts simple strings (for plain-text messages) and dictionaries (for messages containing blocks).\n| `client` | Web API client that uses the token associated with the event. For single-workspace installations, the token is provided to the constructor. For multi-workspace installations, the token is returned by using [the OAuth library](https:\u002F\u002Fdocs.slack.dev\u002Ftools\u002Fbolt-python\u002Fconcepts\u002Fauthenticating-oauth\u002F), or manually using the `authorize` function.\n| `logger` | The built-in [`logging.Logger`](https:\u002F\u002Fdocs.python.org\u002F3\u002Flibrary\u002Flogging.html) instance you can use in middleware\u002Flisteners.\n| `complete` | Utility function used to signal the successful completion of a custom step execution. This tells Slack to proceed with the next steps in the workflow. This argument is only available with the `.function` and `.action` listener when handling custom workflow step executions.\n| `fail` | Utility function used to signal that a custom step failed to complete. This tells Slack to stop the workflow execution. This argument is only available with the `.function` and `.action` listener when handling custom workflow step executions.\n\n## Creating an async app\n\nIf you'd prefer to build your app with [asyncio](https:\u002F\u002Fdocs.python.org\u002F3\u002Flibrary\u002Fasyncio.html), you can import the [AIOHTTP](https:\u002F\u002Fdocs.aiohttp.org\u002Fen\u002Fstable\u002F) library and call the `AsyncApp` constructor. Within async apps, you can use the async\u002Fawait pattern.\n\n```bash\n# Python 3.7+ required\npython -m venv .venv\nsource .venv\u002Fbin\u002Factivate\n\npip install -U pip\n# aiohttp is required\npip install slack_bolt aiohttp\n```\n\nIn async apps, all middleware\u002Flisteners must be async functions. When calling utility methods (like `ack` and `say`) within these functions, it's required to use the `await` keyword.\n\n```python\n# Import the async app instead of the regular one\nfrom slack_bolt.async_app import AsyncApp\n\napp = AsyncApp()\n\n@app.event(\"app_mention\")\nasync def event_test(body, say, logger):\n    logger.info(body)\n    await say(\"What's up?\")\n\n@app.command(\"\u002Fhello-bolt-python\")\nasync def command(ack, body, respond):\n    await ack()\n    await respond(f\"Hi \u003C@{body['user_id']}>!\")\n\nif __name__ == \"__main__\":\n    app.start(3000)\n```\n\nIf you want to use another async Web framework (e.g., Sanic, FastAPI, Starlette), take a look at the built-in adapters and their examples.\n\n* [The Bolt app examples](https:\u002F\u002Fgithub.com\u002Fslackapi\u002Fbolt-python\u002Ftree\u002Fmain\u002Fexamples)\n* [The built-in adapters](https:\u002F\u002Fgithub.com\u002Fslackapi\u002Fbolt-python\u002Ftree\u002Fmain\u002Fslack_bolt\u002Fadapter)\nApps can be run the same way as the syncronous example above. If you'd prefer another async Web framework (e.g., Sanic, FastAPI, Starlette), take a look at [the built-in adapters](https:\u002F\u002Fgithub.com\u002Fslackapi\u002Fbolt-python\u002Ftree\u002Fmain\u002Fslack_bolt\u002Fadapter) and their corresponding [examples](https:\u002F\u002Fgithub.com\u002Fslackapi\u002Fbolt-python\u002Ftree\u002Fmain\u002Fexamples).\n\n## Getting Help\n\n[The documentation](https:\u002F\u002Fdocs.slack.dev\u002Ftools\u002Fbolt-python\u002F) has more information on basic and advanced concepts for Bolt for Python. Also, all the Python module documents of this library are available [here](https:\u002F\u002Fdocs.slack.dev\u002Ftools\u002Fbolt-python\u002Freference\u002F).\n\nIf you otherwise get stuck, we're here to help. The following are the best ways to get assistance working through your issue:\n\n  * [Issue Tracker](http:\u002F\u002Fgithub.com\u002Fslackapi\u002Fbolt-python\u002Fissues) for questions, bug reports, feature requests, and general discussion related to Bolt for Python. Try searching for an existing issue before creating a new one.\n  * [Email](mailto:support@slack.com) our developer support team: `support@slack.com`\n\n\n[pypi-image]: https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fslack-bolt.svg\n[pypi-url]: https:\u002F\u002Fpypi.org\u002Fproject\u002Fslack-bolt\u002F\n[codecov-image]: https:\u002F\u002Fcodecov.io\u002Fgh\u002Fslackapi\u002Fbolt-python\u002Fbranch\u002Fmain\u002Fgraph\u002Fbadge.svg\n[codecov-url]: https:\u002F\u002Fcodecov.io\u002Fgh\u002Fslackapi\u002Fbolt-python\n[python-version]: https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fslack-bolt.svg\n","slackapi\u002Fbolt-python 是一个用于快速构建 Slack 应用的 Python 框架。它支持异步编程，集成了 aiohttp、asyncio 等库，提供了处理 Slack 事件和命令的简洁接口，并且兼容 Socket Mode，允许开发者以更安全的方式与 Slack 平台交互。该框架特别适用于需要集成聊天机器人、自动化工作流或ChatOps场景的企业内部工具开发。通过 Bolt for Python，开发者可以轻松地利用 Slack 的最新功能来增强团队协作效率。",2,"2026-06-11 03:55:21","top_topic"]