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
automatically validates Slack request signature and extract 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.2.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for fastapi_slack-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fdb71571aabc4cc8f7b5396af7573d30886fa9e208002bc784e58ad0244895b |
|
MD5 | e8864a6597a827d1f5d42bc8d3dc7cf4 |
|
BLAKE2b-256 | c05859ca716239c617121798bb14b09986bc97c0c802f34c435c6745e924aab6 |