Skip to main content

Slack extension for FastAPI.

Project description

fastapi-slack

Conventional Commits CircleCI codecov

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

  • Dependding 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

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.1.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

fastapi_slack-0.2.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file fastapi-slack-0.2.1.tar.gz.

File metadata

  • Download URL: fastapi-slack-0.2.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/4.15.0-1077-aws

File hashes

Hashes for fastapi-slack-0.2.1.tar.gz
Algorithm Hash digest
SHA256 663366d068bee9845289c4872a2501e2ccb25ff43d659072f3ba7e11f1e229b0
MD5 5382440b0d42f40fa69fcc06efb7f95f
BLAKE2b-256 ee93eecbca25213c2e826ae2a5e84c37bf7f978e6e007d646016a792b96fa1fa

See more details on using hashes here.

File details

Details for the file fastapi_slack-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: fastapi_slack-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/4.15.0-1077-aws

File hashes

Hashes for fastapi_slack-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f2df02c67c3bcfc399922c79867f010c8a6c618caa61a9e69be32af7ad2be03
MD5 212a4ed6bc7a4fb0a1820af6f3b68078
BLAKE2b-256 8af21af31c9a0859d8844f1557001a62ab00b04f5a53ecbcb1a87da8b9f615ef

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page