slackapi / bolt-python

A framework to build Slack apps using Python
https://slack.dev/bolt-python/
MIT License
1.02k stars 236 forks source link

feat: add WSGI adapter #1085

Closed WilliamBergamin closed 1 month ago

WilliamBergamin commented 1 month ago

This PR introduced a WSGI adapter to bolt python, this will allow Bolt to be deployed in production without the need for an other WSGI compatible Web Framework like Flask

Testing

  1. Pull this branch
  2. Use the examples/wsgi/app.py as starting point for a test app
  3. Run scripts/build_pypi_package.sh
  4. Use the .whl file found under dist/ to run pip install /path/to/dist/slack_bolt.whl
  5. Run pip install gunicorn
  6. Run gunicorn app:api -b 0.0.0.0:3000 --log-level debug to start the application

Category

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

seratch commented 1 month ago

Can you check the flake8 errors? https://github.com/slackapi/bolt-python/actions/runs/9228875341/job/25393855815?pr=1085

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 91.95402% with 7 lines in your changes are missing coverage. Please review.

Project coverage is 91.76%. Comparing base (dbe2333) to head (dd719c0).

Files Patch % Lines
slack_bolt/adapter/wsgi/handler.py 84.61% 6 Missing :warning:
slack_bolt/adapter/wsgi/http_response.py 95.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1085 +/- ## ======================================= Coverage 91.76% 91.76% ======================================= Files 181 186 +5 Lines 6315 6403 +88 ======================================= + Hits 5795 5876 +81 - Misses 520 527 +7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.