fastapi-slack-0.2.3
توضیحات
Slack extension for FastAPI.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | fastapi-slack-0.2.3 |
| نام | fastapi-slack |
| نسخه کتابخانه | 0.2.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Hadrien David |
| ایمیل نویسنده | hadrien@dialogue.co |
| آدرس صفحه اصلی | https://github.com/dialoguemd/fastapi-slack |
| آدرس اینترنتی | https://pypi.org/project/fastapi-slack/ |
| مجوز | MIT |
# fastapi-slack
[](https://conventionalcommits.org)
[](https://circleci.com/gh/dialoguemd/fastapi-slack)
[](https://codecov.io/gh/dialoguemd/fastapi-slack)
Slack extension for FastAPI.
## Configuration - Environment Variables
### `slack_access_token`
Bot User OAuth Access Token as defined in OAuth & Permissions menu of the slack app.
### `slack_signing_secret`
App signing secret as shown in Basic Information menu of the slack app in the App
Credentials section.
## Setup
* Include fastapi-slack router:
```python
import fastapi_slack
from fastapi import FastAPI
app = FastAPI()
app.include_router(fastapi_slack.router)
```
## [Slash Commands]
* Depending on `fastapi_slack.SlashCommand` validates Slack request signature and
extracts the info needed to process it:
```python
from fastapi import Depends, FastAPI
from fastapi_slack import SlashCommand, router
app = FastAPI()
app.include_router(router)
@app.post("/slash-commands")
def process_commands(slash_command: SlashCommand = Depends()):
pass
```
[Slash Commands]: https://api.slack.com/interactivity/slash-commands
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.9,<4.0 | Python |
نحوه نصب
نصب پکیج whl fastapi-slack-0.2.3:
pip install fastapi-slack-0.2.3.whl
نصب پکیج tar.gz fastapi-slack-0.2.3:
pip install fastapi-slack-0.2.3.tar.gz