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

  • Dependency fastapi_slack.with_slash_command validates request signature and extract the slash command info needed to process it:
from fastapi import Depends, FastAPI
from fastapi_slack import SlashCommand, router, with_slash_command

app = FastAPI()
app.include_router(router)


@app.post("/slash-commands")
def process_commands(slash_command: SlashCommand = Depends(with_slash_command)):
    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.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastapi-slack-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 09bbdafa12cd467b710a0934376bd2ee15f67aba2559a2443a6ebb858af5c376
MD5 167ab5a27dc017c82f243828ee2d5f6d
BLAKE2b-256 4212b957ba5843b7950e40af9e1eabc7d36475ffc296d98a03043103c4dcd645

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastapi_slack-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 542a23faeecf7a579e8f18ef5bd8d8ad0b6701933ad39b85f87f4e511c7c19cb
MD5 3d8e0e9ef607652d2fbd66c4d68fc73e
BLAKE2b-256 d998d13066867addfc76da61c05b1d3c80bc1c37d65506f3c2d1a418c8359af6

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