ํ์ ๋๊ตฌ Slack
Slack์ ๊ฒ์ ๊ฐ๋ฐ์๊ฐ ์์ฌ ์ฑํ ํ๋ก๊ทธ๋จ์ผ๋ก ์ฌ์ฉํ๋ ๊ฒ์ ๊ฐ๋ฐ ์ ํ์ผ๋ก ๋ง๋ค์ด ํ์ฌ๋ ๊ธฐ์ ๊ฐ์น๊ฐ ์์ญ ์กฐ์์ ๋ฌํ๋ ์ฑํ ํ๋ก๊ทธ๋จ์ ๋๋ค. ์ฃผ์ ๊ธฐ๋ฅ์ผ๋ก๋ ๋ชจ๋ ์ฑ๋(์ฑํ ๋ฐฉ)์ ๊ฒ์ ๊ธฐ๋ฅ๊ณผ ํ๋ค(ํตํ), Webhook์ ํตํ Alert API ์ฐ๊ฒฐ์ด ์์ต๋๋ค.
Webhook๊ณผ ๋๋ถ์ด slack์ chatbot ์๋น์ค๋ฅผ ์ ๊ณตํฉ๋๋ค. chatbot์ ํตํด ์๋ํ ๊ธฐ๋ฅ์ ๊ตฌํํ ์ ์์ต๋๋ค. ํน์ ๋จ์ด๋ฅผ chatbot handler๊ฐ ๋ชจ๋ํฐ๋งํ๋ฉด์ ํธ๋ฆฌ๊ฑฐ๊ฐ ๋ ๋งํ ์์๊ฐ ์์ผ๋ฉด ์คํ์ด ๋๋ ๋ฐฉ์์ ๋๋ค. ๋ฐ๋ผ์ ๋ฐ์ดํฐ๋ฅผ ๋ณด๋ผ API์ handler๊ฐ ํ์ํฉ๋๋ค.
https://api.slack.com/tools/bolt-python
Building an app with Bolt for Python
Bolt for Python is the quickest way for Python developers start building Slack apps. Learn how to create your first Bolt app with an interactive app home.
api.slack.com
Bolt
The quickest way to start building on the Slack Platform
api.slack.com
Bolt-Python์ Python์ Decorator๋ฅผ ์ฌ์ฉํด ์์ฝ๊ฒ App์ command, action, client ๋ฑ์ ์ฌ์ฉํ ์ ์๊ฒ ํด ์ค๋๋ค. slackbolt๋ fastapi, flask, Django handler๋ฅผ ์ค์ ํ ์ ์์ต๋๋ค.
https://github.com/slackapi/bolt-python
GitHub - slackapi/bolt-python: A framework to build Slack apps using Python
A framework to build Slack apps using Python. Contribute to slackapi/bolt-python development by creating an account on GitHub.
github.com
slack-bolt๋ง์ ์ฌ์ฉํด ๊ฐ๋ฐ์ ํ ๋ ๋จ์ ์ด ์๋ค๋ฉด uvicorn์ reload ๊ธฐ๋ฅ์ ์ฌ์ฉํ ์ ์์ต๋๋ค. ๊ฐ๋ฐ ๊ณผ์ ์์๋ ์ฆ์ app ์ข ๋ฃ๋ ๋ถํ์ํ๊ธฐ ๋๋ฌธ์ fastapi์ handler๋ฅผ ๋ถ์ฌ reload๋ฅผ ๊ฐ๋ฅํ๊ฒ ํฉ๋๋ค.
How to modify my Python Slack Bolt Socket mode code to reload automatically during any code changes
I have the following Python code which works fine using the Web Socket mode. When I type a slash command (/hello-socket-mode) on my Slash application then it very well invokes my method,
stackoverflow.com
๋ ๋ค๋ฅธ ๋ฐฉ๋ฒ์ผ๋ก๋ jurigged๋ฅผ ์ฌ์ฉํด ๊ฐ์ ํจ๊ณผ๋ฅผ ์ค ์ ์์ต๋๋ค.
https://gist.github.com/seratch/cad385de1ca07cb3c63bc5408ba66823
Hot-reloading Socket Mode app using Jurigged (Python) - `SLACK_LOCAL_DEV=1 python app.py`
Hot-reloading Socket Mode app using Jurigged (Python) - `SLACK_LOCAL_DEV=1 python app.py` - app.py
gist.github.com
'๐งโ๐ป Develop' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
์ ์ฉํPython ๊ฐ๋ฐ ํ๊ฒฝ ์ค์ (feat. outlore.dev) (0) | 2024.11.23 |
---|---|
[Airflow 3] What's new Airflow 3 (0) | 2024.10.25 |
[golang-jwt] 401 "Token used beford issued" (0) | 2024.09.26 |
[Synology] openproject ๊ตฌ์ถ (0) | 2024.09.17 |
Github ๊ณ์ ์ ํ (0) | 2024.08.19 |