Skip to main content

Installation

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

Install the Python package from PyPI:

pip install slackblocks

Python 2.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~=2.0, and uninstall with pip uninstall slackblocks (or the equivalent command for your package manager).