bolt-python

A framework to build Slack apps using Python

MIT License

Downloads
1.2M
Stars
1.1K
Committers
49

Bot releases are hidden (Show)

bolt-python - version 1.3.0

Published by seratch over 3 years ago

This release upgrades the underlying slack-sdk package from 3.2 to 3.3. Refer to the package's release note for more details: https://github.com/slackapi/python-slack-sdk/releases/tag/v3.3.0

Changes

  • Upgrade slack-sdk from 3.2 to 3.3 - Thanks @seratch
  • #224 #113 Workflow steps decorator - Thanks @seratch
  • #220 Correct Event API document - Thanks @mwbrooks

References

bolt-python - version 1.2.3

Published by seratch over 3 years ago

Changes

  • #215 #216 #217 Using callable object instances as middleware does not work - Thanks @nickovs

References

bolt-python - version 1.2.2

Published by seratch almost 4 years ago

Changes

  • #199 #201 Improvement related to #199: add event type name validation - Thanks @cgamio @seratch
  • #212 #208 AsyncOAuthFlow run_installation missing team_name and enterprise_name fields in returned Installation - Thanks @jwelch92 @seratch
  • #213 #210 AsyncOAuthSettings uses CallbackOptions instead of AsyncCallbackOptions - Thanks @jwelch92 @seratch

References

bolt-python - version 1.2.1

Published by seratch almost 4 years ago

Changes

  • #203 Fix #198 bug where str subtype constraint does not work - Thanks @seratch

References

bolt-python - version 1.2.0

Published by seratch almost 4 years ago

New Features

Socket Mode

This version includes support for Socket Mode, which enables developers to receive interactivy payalods and events through WebSocket connections.

https://api.slack.com/socket-mode

For WebSocket connection handling, there are four implementations including major 3rd party open-source libraries.

PyPI Project Bolt Adapter
skack_sdk slack_bolt.adapter.socket_mode.SocketModeHandler
websocket_client slack_bolt.adapter.socket_mode.websocket_client.SocketModeHandler
aiohttp (asyncio-based) slack_bolt.adapter.socket_mode.aiohttp.AsyncSocketModeHandler
websockets (asyncio-based) slack_bolt.adapter.socket_mode.websockets.AsyncSocketModeHandler

Here is a minimal working example with the built-in WebSocket client. You can switch to other implementation by changing the imports and adding the extra dependencies (websocket_client, aiohttp, websockets).

import os
from slack_bolt import App
from slack_bolt.adapter.socket_mode import SocketModeHandler

# Install the Slack app and get xoxb- token in advance
app = App(token=os.environ["SLACK_BOT_TOKEN"])

if __name__ == "__main__":
    # export SLACK_APP_TOKEN=xapp-***
    # export SLACK_BOT_TOKEN=xoxb-***
    SocketModeHandler(app, os.environ["SLACK_APP_TOKEN"]).start()

If you want to use asyncio for everything, you can use aiohttp or websockets (along with aiohttp for AsyncWebClient). AsyncSocketModeHandler requires all of your middleware/listeners to be compatible with the async/await programming style.

from slack_bolt.app.async_app import AsyncApp
# The default is the aiohttp based implementation
from slack_bolt.adapter.socket_mode.async_handler import AsyncSocketModeHandler

app = AsyncApp(token=os.environ["SLACK_BOT_TOKEN"])

async def main():
    handler = AsyncSocketModeHandler(app, os.environ["SLACK_APP_TOKEN"])
    await handler.start_async()

if __name__ == "__main__":
    import asyncio
    asyncio.run(main())

Changes

  • #108 #160 #176 #159 #200 Socket Mode support - Thanks @seratch @stevegill
  • #174 #192 #202 Enable using class/instance methods for middleware/listners - Thanks @liuyangc3 @seratch
  • #197 #198 Fix a bug where bot messages from class apps won't be passed to app.message listeners - Thanks @uc-dang-tiki @seratch
  • #186 #183 Add an easier way to configure the direct install URL on App Directory

References

bolt-python - version 1.1.5

Published by seratch almost 4 years ago

Changes

  • #194 Fix #193 by enabling listener middleware to return a response - Thanks @Ambro17 @seratch
  • #189 Add type hint updates missed in #148 - Thanks @seratch
  • Upgrade slack_sdk to v3.1.1 - Thanks @seratch

References

bolt-python - version 1.1.4

Published by seratch almost 4 years ago

Changes

  • #180 Fix #158 by adding token_verification_enabled option to App - Thanks @seratch
  • #167 Upgrade black (code formatter) to the latest version - Thanks @seratch

References

bolt-python - version 1.1.3

Published by seratch almost 4 years ago

This patch version is a hotfix release for v1.1.2. If you use installation_store_bot_only option, please upgrade to this version.

Changes

  • #177 #178 Enable to use installation_store_bot_only flag not only as the top-level arg - Thanks @seratch

References

bolt-python - version 1.1.2

Published by seratch almost 4 years ago

New Features

v1.0 authorize compatible mode

Now you can use InstallationStore's v1.0 compatible mode in authorize.

Setting App/AsyncApp's installation_store_bot_only constructor argument as True works in the same manner as v1.0 authorize. If you manually initialize InstallationStoreAuthorize, bot_only flag in it is the one you can configure. See the pull request #171 for more details.

installation_store = MyInstallationStore()
oauth_state_store = MyOAuthStateStore()

app = App(
    # If you want to keep using only `#find_bot` for token retrieval,
    # you can configure installation_store_bot_only as True
    installation_store_bot_only=True,
    oauth_settings=OAuthSettings(
        installation_store=installation_store,
        state_store=oauth_state_store,
    ),
)

NOTE: If you use installation_store_bot_only flag in OAuthFlow or OAuthSettings, please upgrade to v1.1.3 or higher.

Changes

  • #171 Add v1.0 compatible mode to #148 Org-wide App support - Thanks @seratch
  • #173 #170 Remove the possibility of issue #170 by removing emoji from the boot message only for Windows - Thanks @athifongoqa @seratch
  • #172 Fix Django app example to run with v1.1 - Thanks @vokey

References

bolt-python - version 1.1.1

Published by seratch almost 4 years ago

Changes

  • #165 #168 Provide a way to easily use aiohttp-devtools for AsyncApp apps - Thanks @stevegill @seratch
  • #169 Improve request parser to safely extract values from payloads in any case - Thanks @seratch

References

bolt-python - version 1.1.0

Published by seratch almost 4 years ago

New Features

Org-Wide App Installation Support

This version includes the changes related to Org-Wide App feature, which is for Enterprise Grid organizations.

https://api.slack.com/enterprise/apps

Refer to the Python Slack SDK's release note for details: https://github.com/slackapi/python-slack-sdk/releases/tag/v3.1.0

As long as the changes on the low-level SDK side does not affect your apps, most of existing Bolt apps do not require any updates in code. If you are an existing user of either of AmazonS3InstallationStore or FileInstallationStore, please upgrade to v1.1.3 or higher and set installation_store_bot_only flag as True in App/AsyncApp constructor. See v1.1.2 release note for details.

Changes

  • #148 Add Org-Wide App Installation Support - Thanks @stevegill @seratch

References

bolt-python - version 1.1.0 RC1

Published by seratch almost 4 years ago

See v1.1.0 release note.

bolt-python - version 1.0.1

Published by seratch almost 4 years ago

Changes

  • #152 Fix Events API handling issue in shared channels - Thanks @seratch
  • #153 Add OAuth related arg validation and flexibility - Thanks @seratch
  • #154 Apply internal adjustments for Socket Mode support - Thanks @seratch

References

bolt-python - version 1.0.0

Published by seratch almost 4 years ago

Here is the first stable version of Bolt for Python 🎉

This framework has been carefully designed to be easy and intuitive for Python developers while aligning with the existing Bolt frameworks. If you’re a Pythonista, we think you’ll like it!

You can start with pip install slack_bolt and the Getting Started Guide. To learn more, check the following resources:

bolt-python - version 1.0.0 RC2

Published by seratch almost 4 years ago

This is the latest release candidate version of slack_bolt v1.0.0.

We will be releasing v1.0.0 within a few days. Thank you very much for all the contributions and feedback from the community!

bolt-python - version 1.0.0 RC1

Published by seratch almost 4 years ago

This is the first release candidate version of slack_bolt v1.0.0.

We will be releasing v1.0.0 within a few days. Thank you very much for all the contributions and feedback from the community!

bolt-python - version 0.9.6 beta

Published by seratch almost 4 years ago

bolt-python - version 0.9.5 beta

Published by seratch almost 4 years ago

bolt-python - version 0.9.4 beta

Published by seratch almost 4 years ago

bolt-python - version 0.9.3 beta

Published by seratch about 4 years ago

Package Rankings
Top 6.67% on Proxy.golang.org
Top 1.32% on Pypi.org
Related Projects