{"id":13821022,"url":"https://github.com/nicklambourne/slackblocks","last_synced_at":"2026-05-10T08:15:38.197Z","repository":{"id":35045095,"uuid":"196840370","full_name":"nicklambourne/slackblocks","owner":"nicklambourne","description":":game_die: Python API for Building Messages Using the Slack Block Kit API","archived":false,"fork":false,"pushed_at":"2025-06-13T11:35:56.000Z","size":3783,"stargazers_count":68,"open_issues_count":0,"forks_count":26,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-27T00:55:36.421Z","etag":null,"topics":["blocks","python","slack","slack-api","slack-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicklambourne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-07-14T13:33:22.000Z","updated_at":"2025-06-15T16:12:41.000Z","dependencies_parsed_at":"2023-01-15T12:40:46.461Z","dependency_job_id":"34354979-ccf9-4735-80cf-feb0aad8c566","html_url":"https://github.com/nicklambourne/slackblocks","commit_stats":{"total_commits":77,"total_committers":9,"mean_commits":8.555555555555555,"dds":"0.16883116883116878","last_synced_commit":"c5bc21a4ebddb1f18daa461d72397a5e56bb5d11"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/nicklambourne/slackblocks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklambourne%2Fslackblocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklambourne%2Fslackblocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklambourne%2Fslackblocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklambourne%2Fslackblocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicklambourne","download_url":"https://codeload.github.com/nicklambourne/slackblocks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicklambourne%2Fslackblocks/sbom","scorecard":{"id":685190,"data":{"date":"2025-08-11","repo":{"name":"github.com/nicklambourne/slackblocks","commit":"68a90ac4bef04fd8e64a14ad3aa428258b97e427"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.6,"checks":[{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: topLevel 'contents' permission set to 'write': .github/workflows/docs.yml:7","Warn: no topLevel permission defined: .github/workflows/formatting.yml:1","Warn: no topLevel permission defined: .github/workflows/linting.yml:1","Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/type-checking.yml:1","Warn: no topLevel permission defined: .github/workflows/unit-tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":2,"reason":"Found 5/22 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/docs.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/formatting.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/formatting.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/formatting.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/formatting.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/formatting.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/formatting.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/formatting.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/formatting.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linting.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/linting.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linting.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/linting.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/linting.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/linting.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linting.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/linting.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/linting.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/linting.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/publish.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/publish.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/type-checking.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/type-checking.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/type-checking.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/type-checking.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/type-checking.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/type-checking.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/type-checking.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/type-checking.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/unit-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/unit-tests.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/unit-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/unit-tests.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/nicklambourne/slackblocks/unit-tests.yml/master?enable=pin","Info:   0 out of  15 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   7 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-9548-qrrj-x5pj","Warn: Project is vulnerable to: GHSA-79v4-65xg-pq4g","Warn: Project is vulnerable to: GHSA-48p4-8xcf-vxj5","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T00:34:35.317Z","repository_id":35045095,"created_at":"2025-08-22T00:34:35.317Z","updated_at":"2025-08-22T00:34:35.317Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278974233,"owners_count":26078375,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blocks","python","slack","slack-api","slack-bot"],"created_at":"2024-08-04T08:01:13.899Z","updated_at":"2025-10-08T16:16:01.140Z","avatar_url":"https://github.com/nicklambourne.png","language":"Python","funding_links":[],"categories":["Python",":hammer_and_wrench: \u0026nbsp; Libraries and SDKs"],"sub_categories":["Python"],"readme":"# slackblocks \u003cimg src=\"https://github.com/nicklambourne/slackblocks/raw/master/docs_src/img/sb.png\" align=\"right\" width=\"250px\"/\u003e\n\n![Licence: MIT](https://img.shields.io/badge/License-MIT-green.svg)\n![Licence: BSD-3-Clause](https://img.shields.io/badge/License-BSD_3_Clause-green.svg)\n![Python Versions](https://img.shields.io/pypi/pyversions/slackblocks)\n[![PyPI](https://img.shields.io/pypi/v/slackblocks?color=yellow\u0026label=PyPI\u0026logo=python\u0026logoColor=white)](https://pypi.org/project/slackblocks/#history)\n[![Downloads](https://static.pepy.tech/badge/slackblocks)](https://pepy.tech/project/slackblocks)\n[![Build Status](https://github.com/nicklambourne/slackblocks/actions/workflows/unit-tests.yml/badge.svg?branch=master)](https://github.com/nicklambourne/slackblocks/actions)\n[![Docs](https://img.shields.io/badge/Docs-8A2BE2.svg)](https://nicklambourne.github.io/slackblocks)\n\n## What is it?\n`slackblocks` is a Python API for building messages in the fancy Slack [Block Kit API](https://api.slack.com/block-kit)\n\n## Documentation\nFull documentation is provided [here](https://nicklambourne.github.io/slackblocks/latest/).\n\n## Requirements\n`slackblocks` requires Python \u003e= 3.8.\n\nAs of version 0.1.0 it has no dependencies outside the Python standard library.\n\n## Installation\n```bash\npip install slackblocks\n```\n\n## Basic Usage\n```python\nfrom slackblocks import Message, SectionBlock\n\n\nblock = SectionBlock(\"Hello, world!\")\nmessage = Message(channel=\"#general\", blocks=block)\nmessage.json()\n\n```\n\nWill produce the following JSON string:\n```json\n{\n    \"channel\": \"#general\",\n    \"mrkdwn\": true,\n    \"blocks\": [\n        {\n            \"type\": \"section\",\n            \"block_id\": \"992ceb6b-9ad4-496b-b8e6-1bd8a632e8b3\",\n            \"text\": {\n                \"type\": \"mrkdwn\",\n                \"text\": \"Hello, world!\"\n            }\n        }\n    ]\n}\n```\nWhich can be sent as payload to the Slack message API HTTP endpoints.\n\nOf more practical use is the ability to unpack the objects directly into \nthe [(Legacy) Python Slack Client](https://pypi.org/project/slackclient/) in order to send messages:\n\n```python\nfrom os import environ\nfrom slack import WebClient\nfrom slackblocks import Message, SectionBlock\n\n\nclient = WebClient(token=environ[\"SLACK_API_TOKEN\"])\nblock = SectionBlock(\"Hello, world!\")\nmessage = Message(channel=\"#general\", blocks=block)\n\nresponse = client.chat_postMessage(**message)\n```\n\nOr the modern Python [Slack SDK](https://pypi.org/project/slack-sdk/):\n```python\nfrom os import environ\nfrom slack_sdk import WebClient\nfrom slackblocks import Message, SectionBlock\n\n\nclient = WebClient(token=environ[\"SLACK_API_TOKEN\"])\nblock = SectionBlock(\"Hello, world!\")\nmessage = Message(channel=\"#general\", blocks=block)\n\nresponse = client.chat_postMessage(**message)\n```\n\nNote the `**` operator in front of the `message` object.\n\n## Can I use this in my project?\nYes, please do! The code is all open source and dual BSD-3.0 and MIT licensed\n    (use what suits you best).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicklambourne%2Fslackblocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicklambourne%2Fslackblocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicklambourne%2Fslackblocks/lists"}