Skip to main content

A collection of simple, pre-configured Slack block kit components to use with Slack notification messages.

Project description

CA Slack Block Kit

A collection of simple, pre-configured Slack block kit components to use to construct Slack notification messages.

Installation

This package is available for installation via PyPi:

UV Project

uv add ca-slack-block-kit

Poetry Project

poetry add ca-slack-block-kit

Pip

pip install ca-slack-block-kit

Usage

To form a Slack message, import the required components from the package and use them to build your message payload as a list of Block instances.

from ca_slack_block_kit import Block, Divider, Header, MarkdownSection, render_blocks

message: list[Block] = []

message.append(Header("This is a header"))
message.append(Divider())
message.append(MarkdownSection("**This is a markdown section**"))

# The message can then be sent using the Slack SDK
client = slack_sdk.WebClient(token=slack_bot_token)
client.chat_postMessage(
    channel=<slack_channel_id>,
    text=<title_text>,
    blocks=render_blocks(message),
)

Available Blocks

See the full documentation for a list of available blocks and their usage.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ca_slack_block_kit-1.2.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ca_slack_block_kit-1.2.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file ca_slack_block_kit-1.2.0.tar.gz.

File metadata

  • Download URL: ca_slack_block_kit-1.2.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ca_slack_block_kit-1.2.0.tar.gz
Algorithm Hash digest
SHA256 b582c336a521f2e471a4a953045f2595160f1e51c74248a681d4bed0f3b65764
MD5 94ac9d5c326c400bb93ffd994da15c2d
BLAKE2b-256 c3c39ceb3008cd1545269a08e17a5eaa1bb20e9e8d83252877be0d685406ec8e

See more details on using hashes here.

File details

Details for the file ca_slack_block_kit-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: ca_slack_block_kit-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ca_slack_block_kit-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8dacb6483cef8b504ac28a9ef8c131b6195b67b78d5b5985d06d3f2bb81db28
MD5 c4413ad68e8713a95035a483e8a9a7cc
BLAKE2b-256 2a891bb3aff1a6a916842e12b4b19dbda828e03b4e4545c288ffdff10ed4120a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page