captClueless
captClueless

Reputation: 101

running slack events adapter within a flask app

The new slack events api with slack events adapter (https://github.com/slackapi/python-slack-events-api) is definitely powerful and abstracts out a lot of unnecessary code including handling http retries and so on. Therefore, I am considering switching to the adapter model from the normal events api.

However, the adapter is a flask app on its own. My current event listener was a flask blueprint. I will therefore have to run 2 flask apps now to support the events adapter. Although, running 2 flask apps is possible, sharing data across the 2 apps becomes difficult and leads to unnecessary complication.

Therefore, I wanted to know from you guys, if there is an easy and elegant way to run multiple flask apps which use same configurations, need similar installations and share data and models across.

Upvotes: 2

Views: 823

Answers (1)

captClueless
captClueless

Reputation: 101

I figured it out. Its fairly straightforward. I just went through their github code and I can replicate the rest of the adapter code without starting the server which kinda resolves the problem.

Upvotes: 1

Related Questions