Slack extension for FastAPI.
Project description
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:
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:
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fastapi-slack-0.2.3.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for fastapi_slack-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0433bd45f66d8b2b361f8ec7bb99c8259e1e8ac89ad539082dad08d08f87cb1 |
|
MD5 | 41a20b5345665478cb698d3b7a7d675a |
|
BLAKE2b-256 | f100e0973e9ab8f842ec8976f3a69369883074ebb323cd1abde5d0bdfb5e060b |