Skip to main content

Simple Slack Send - easily send slack messages in your CI pipelines

Simple Slack Send is designed to push templated slack notifications from you CI pipelines using Slack's incoming webhooks.

Template engine

Simple Slack Send uses Jinja2 under the hood to produce Slack messages in JSON format. You can use any expression (values, includes, conditions, loops etc.) that is allowed by Jinja. If the rendering engine's output is empty, no message is sent.

Parameter sources

Jinja templates are fed with values from multiple sources given as command arguments:

  1. env files with key-value pairs ie. -e production.env or --env-file=staging.env
  2. json files ie. -j terraform-output.json or --env-file=infrastructure.json
  3. key-value pairs provided as command arguments ie. -v env_name=jupiter or --var instance_type=small
  4. system environment - turned on/off with --sys-env/--no-sys-env option; on by default

Configuration

You can pass Slack's webhook url by settings SLACK_WEBHOOK_URL env variable or using --webhook-url argument.

Example usage

message.json.tpl:

{% if BITBUCKET_EXIT_CODE == "0" %}
{
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": ":large_green_circle: Commit {{ BITBUCKET_COMMIT }} built successfully."
      }
    }
  ]
}
{% else %}
{
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": ":red_circle: Commit {{ BITBUCKET_COMMIT }} failed to build. Visit <https://bitbucket.org/{{ BITBUCKET_REPO_FULL_NAME }}/pipelines/results/{{ BITBUCKET_BUILD_NUMBER }}|pipeline> for details."
      }
    }
  ]
}
{% endif %}
simple-slack-send message.json.tpl

Metadata

Release files for Simple-Slack-Send 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Simple-Slack-Send 0.1.2
File Size Uploaded Provenance
Simple Slack Send-0.1.2.tar.gz 5.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for Simple-Slack-Send 0.1.2
File Interpreter ABI Platform
Simple_Slack_Send-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 kB

Release files / Simple Slack Send-0.1.2.tar.gz

Download URL Simple Slack Send-0.1.2.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ed919c84ab97889a0d9f1c011a391caa10e17c5b59b9c2b308d756b50e6f5703
BLAKE2b-256 checksum
How to use checksums
1ae8012863cc1f062c0cea2b5b96e6192ea1b278003288a55b370a7770754171
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / Simple_Slack_Send-0.1.2-py3-none-any.whl

Download URL Simple_Slack_Send-0.1.2-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0bf4d152db21038b976a49b993b9a682dd600a93a160c77e9c14deaf3a21dd67
BLAKE2b-256 checksum
How to use checksums
c6c60d889f3989dc25334674504059295b666a419671ff060af6fc1369f3d71d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for Simple-Slack-Send 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page