You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tutorial/03-responding-to-slack-events.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,7 @@ The code for this step is available [here](PythOnBoardingBot).
12
12
```
13
13
slackclient>=2.0.0
14
14
slackeventsapi>=2.1.0
15
-
Flask>=1.1.1
16
-
certifi
15
+
Flask>=1.1.2
17
16
```
18
17
19
18
> 💡 **[Certifi](https://github.com/certifi/python-certifi)** is a carefully curated collection of Root Certificates for validating the trustworthiness of SSL certificates while verifying the identity of TLS hosts. It has been extracted from the Requests project.
@@ -39,8 +38,6 @@ import logging
39
38
from flask import Flask
40
39
from slack import WebClient
41
40
from slackeventsapi import SlackEventAdapter
42
-
import ssl as ssl_lib
43
-
import certifi
44
41
from onboarding_tutorial import OnboardingTutorial
45
42
```
46
43
@@ -210,19 +207,25 @@ def message(payload):
210
207
211
208
Finally, we need to make our app runnable.
212
209
213
-
- 🏁 Add the following lines of code to the end of `app.py`.
210
+
- 🏁 Add the following lines of code to the end of `app.py` and run `FLASK_ENV=development python app.py`.
**Note:** When running in a virtual environment you often need to specify the location of the SSL Certificate(`cacert.pem`). To make this easy we use Certifi's built-in `where()` function to locate the installed certificate authority (CA) bundle.
**Final Note:** If you're interested in learning how to modify this app to run asynchronously I've adapted this code as such [here](PythOnBoardingBot/async_app.py).
0 commit comments