Skip to main content
https://img.shields.io/pypi/v/slackpy.svg https://img.shields.io/pypi/dm/slackpy.svg

slackpy

A Simple and Human Friendly Slack Client for Logging.

Use Case

Install

Requires Python 3.11 or newer.

pip install slackpy

Dependencies

  • requests>=2.32.5

  • certifi>=2026.10.19

  • retrying

Sample Code

import slackpy

INCOMING_WEB_HOOK = 'your_web_hook_url'
CHANNEL = '#general'
USER_NAME = 'Logger'
ICON_URL = 'http://lorempixel.com/48/48'

# Create a new instance.
logging = slackpy.SlackLogger(INCOMING_WEB_HOOK, CHANNEL, USER_NAME, ICON_URL)

# You can set a log level. The default level is INFO.
logging.set_log_level(slackpy.LogLv.DEBUG) # Or logging.set_log_level(10)

## Minimum Parameter
## logging = slackpy.SlackLogger(INCOMING_WEB_HOOK)

# Simple Usage
logging.info('INFO Message')

# LogLevel's only required parameter is "message", all others are optional.

# LogLevel: DEBUG
logging.debug(message='DEBUG Message', title='DEBUG Title', fields='')

# LogLevel: INFO
logging.info(message='INFO Message', title='INFO Title', fields='')

# LogLevel: WARN
logging.warn(message='WARN Message', title='WARN Title', fields='')

# LogLevel: ERROR
logging.error(message='ERROR Message', title='ERROR Title', fields='')

# LogLevel: CUSTOM
logging.message(message='CUSTOM Message', title='CUSTOM Title', color='good',
                fields=[{"title": "CUSTOM", "value": "test", "short": True}],
                log_level=40)

# Title Link (New v2.1.0)
logging.info(message='INFO Message', title='slackpy Repository here',
             title_link='https://github.com/iktakahiro/slackpy')

Method

LogLevel

Color

debug()

DEBUG (10)

#03A9F4 (Light Blue)

info()

INFO (20)

good (green)

warn()

WARNING (30)

warning (orange)

error()

ERROR (40)

danger (red)

The definition of the log level is based on the standard library. (https://docs.python.org/3/library/logging.html#levels)

Command line

export SLACK_INCOMING_WEB_HOOK='your_web_hook_url'

# LogLevel: DEBUG
slackpy -c '#your_channel' -m 'DEBUG Message' -l 10

# LogLevel: INFO
slackpy -c '#your_channel' -m 'INFO Message' -l 20

# LogLevel: WARN
slackpy -c '#your_channel' -m 'WARN Message' -l 30

# LogLevel: ERROR
slackpy -c '#your_channel' -m 'ERROR Message' -l 40

# LogLevel: DEBUG (without specifying #channel)
slackpy -m 'DEBUG Message' -l 10

# LogLevel: INFO (with Message Title)
slackpy -c '#your_channel' -t 'INFO Message Title' -m 'INFO Message' -l 20

For AWS Lamdba

# First, pip install to top of project directory.
pip install slackpy -t .

# Second, archive your source code and dependency packages.
zip -r src.zip lambda_function.py slackpy requests certifi charset_normalizer idna urllib3 retrying

# Finally, upload src.zip

About Versioning

slackpy is following Semantic Versioning 2.0.0.

Metadata

Release files for slackpy 3.0.0

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

Source distribution (sdist)

Source distribution for slackpy 3.0.0
File Size Uploaded Provenance Actions
slackpy-3.0.0.tar.gz 7.5 kB With provenance Details for slackpy-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for slackpy 3.0.0
File Interpreter ABI Platform Actions
slackpy-3.0.0-py3-none-any.whl Python 3 none any Details for slackpy-3.0.0-py3-none-any.whl

Total release size: 13.9 kB

Release files / slackpy-3.0.0.tar.gz

Download URL slackpy-3.0.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0763f135a1adefd86d04c1f452f175ec2a3ddbfd4c2531fd70dc136dc7667faa
BLAKE2b-256 checksum
How to use checksums
1ce36207f2a15f78e2ac40d3656ae429be82e020198fe361c755694dc471a054
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / slackpy-3.0.0-py3-none-any.whl

Download URL slackpy-3.0.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7cdcf4fe71f24fd81bef11c53f06361ba6b6919c50558b5b909f2236852df82
BLAKE2b-256 checksum
How to use checksums
7ae7e9fc00431e6b87e674964f6bd06f4a360ba78eb19961abae819b6e8ff4d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for slackpy 3.0.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for slackpy-3.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 release files Full provenance

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