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

  • 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

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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastapi-slack-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 9dded2f3f9a288c15e0a5f13e3f3d69d7e33166902b6b520a8b3fd363c886392
MD5 2531deec5a1f96f6750640340a96ea8b
BLAKE2b-256 ab53486380b74f125605855491cbe020d39efeb9010110f9c4ff9c0a19f47376

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastapi_slack-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8fdb71571aabc4cc8f7b5396af7573d30886fa9e208002bc784e58ad0244895b
MD5 e8864a6597a827d1f5d42bc8d3dc7cf4
BLAKE2b-256 c05859ca716239c617121798bb14b09986bc97c0c802f34c435c6745e924aab6

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