Skip to main content
Python v3.1.0

Installation

Choose a language from the site navigation. The selection applies across the documentation and is preserved as you move between pages.

These instructions target coordinated release 3.1.0 across all ten implementations. Frozen 3.0.0 documentation remains available.

Install the Python package from PyPI:

pip install slackblocks

Python 3.x requires Python 3.10 or newer and has no runtime dependencies. See Compatibility for the support matrix and 1.x migration guidance.

Verify the installation:

from slackblocks import Message, SectionBlock

print(Message(channel="#general", blocks=SectionBlock("Hello, world!")).json())

Pin the current major release with slackblocks~=3.0, and uninstall with pip uninstall slackblocks (or the equivalent command for your package manager).