Add support for "sub apps"
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず slack_bolt.App と slack_bolt.async_app.AsyncApp の composition API を確認し、次に issue #236 に記載された workaround を読みます。要求されている add_app の動作を、FastAPI の include_router および Typer の add_typer と比較します。独立して定義された sub-app または plugin を、親 app を手動で渡したり decorator を直接呼び出したりせずに、両方の app バリアントへアタッチできるようになれば作業完了です。
索引モデルが issue の本文から書いたものです。
説明
When creating a large slack application it would be nice to be able to reuse components in a more pythonic way than what is possible right now.
A workaround is described in issue #236, but it requires passing the app object around and manually wiring up things by registering and calling decorators as functions directly.
I suggest adding a feature much like include_router in FastAPI or add_typer in Typer.
This feature will let us create sub-apps in separate files or even separate packages, like plugins that can be published on pypi.org separately.
Here is a small example illustrating what I mean:
main.py
Here is our main app, where we add a plugin from a separate package
import os
from slack_bolt import App
from my_plugin import my_plugin
# Initializes your app with your bot token and signing secret
app = App(
token=os.environ.get("SLACK_BOT_TOKEN"),
signing_secret=os.environ.get("SLACK_SIGNING_SECRET")
)
app.add_app(my_plugin)
my_plugin.py
A simple plugin that just creates a slack_bolt app, but without any config
from slack_bolt import App
my_plugin = App()
@my_plugin.message("hello")
def message_hello(message, say):
say("Hello world")
Category
- slack_bolt.App and/or its core components
- slack_bolt.async_app.AsyncApp and/or its core components
- Adapters in slack_bolt.adapter
- Others
- 主要言語
- Python
- スター
- 1.3k
- フォーク
- 300
- 平均マージ
- 19時間 33分
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
slackapi/bolt-python のほかの issue
-
`extract_team_id` crashes with `TypeError when payload["user"]` is a string (e.g. `member_joined_channel` events)対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンauto-triage-skip bug security semver:major
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
slackapi/bolt-python#1447 · コメント 9 件 ·
メンテナーはふだん 1 日以内に返信
-
auto-triage-stale
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
slackapi/bolt-python#1599 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Error handlers that take args: Args crash with a missing 'next' argument対応中かも @sahiljagtap08 が 42 日前に担当しました。 オープンauto-triage-stale
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
slackapi/bolt-python#1598 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Assistant listener middleware crashes when given a plain function対応中かも @sahiljagtap08 が 42 日前に担当しました。 オープンauto-triage-stale
難易度 2/5 1〜3時間 初心者へのやさしさ 30/100
slackapi/bolt-python#1597 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
AsyncOAuthFlow raises UnboundLocalError on org-wide install without a bot token対応中かも @sahiljagtap08 が 42 日前に担当しました。 オープンauto-triage-stale
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
slackapi/bolt-python#1596 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
slackapi/bolt-python の issue をすべて見る
似ている issue
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
BrainLesion/BraTS#200 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
OpenHands/extensions#970 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
rl-institut/enetra#91 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
huggingface/datasets#9100 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
NVIDIA/garak#2486 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信