Skip to main content

Rapporteur

A simple package to log the result of the execution of a program, as well as status updates, to Slack (and possibly other backends).

Install

pip install rapporteur
# or #
uv add rapporteur

Getting the information you need

To make rapporteur work, you need:

  1. A Slack app installed in the workspace (https://api.slack.com/apps). Make sure that it has the scope to write to channels. Then, add it to the relevant channels (Edit Settings for the channel, go to Integrations, Add App, then select the app).
  2. A token for that app. You can find it in OAuth&Permissions
  3. The channel ID. If you click on the name of a channel, you can see its Channel ID at the bottom, which typically starts with C. If you are in a browser, it is also the last part of the URL.

Basic usage

from rapporteur.report import Report
from rapporteur.slack import SlackReporter

report = Report(
    description="My test report",
    reporters=[
        SlackReporter(token="xoxb-your-token", channel="C12345678")
    ],
)
with report:
    logger.info("Hello, world!")
    logger.error("oh no!")  # Will be in the Slack report

With serieux

The configuration for a report can be stored in a file and deserialized using serieux (>=0.2.9).

Configuration

description: "test test test"
reporters:
  - $class: rapporteur.slack:SlackReporter
    token: "xoxb-your-token"
    show_logs: 5   # Show last 5 error logs
    channel: "C12345678"

To encrypt the token using PASSWORD, set the $SERIEUX_PASSWORD environment variable to PASSWORD and run:

serieux patch -m rapporteur.report:Report -f path/to/config.yaml

The above command will patch the config inplace to replace the token with an encrypted version of the token, using the provided password. The argument to -m is a reference to the model for the whole configuration file, so you may want to adjust it if the report config is part of a bigger config.

Code

import os
from serieux import deserialize
from serieux.features.encrypt import EncryptionKey

# You can omit EncryptionKey if it's not encrypted
report = deserialize(Report, Path("path/to/config.yaml"), EncryptionKey(os.environ[SERIEUX_PASSWORD]))
with report:
    logger.info("Hello, world!")
    logger.error("oh no!")  # Will be in the Slack report

    # Optional: set a custom message to be displayed at the end
    report.set_message("It is done.")

Metadata

Release files for rapporteur 0.1.4

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

Source distribution (sdist)

Source distribution for rapporteur 0.1.4
File Size Uploaded
rapporteur-0.1.4.tar.gz 3.6 kB Details

Built distribution (wheel)

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

Total release size: 8.6 kB

Release files / rapporteur-0.1.4.tar.gz

Download URL rapporteur-0.1.4.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1f7a1934b8d45a10c7bde6b6426c2c4ff06f5c80b266e3e00e19e711ad31e5ec
BLAKE2b-256 checksum
How to use checksums
c3a51caf980b05d0fc6f5edec1305249dc6814a5cbfeff587b5360264c4fcc45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 4, 2026.

Transparency log

Release files / rapporteur-0.1.4-py3-none-any.whl

Download URL rapporteur-0.1.4-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6a97580ece18ef229a6f330995778fa5547bdc9ab9598cce90a85a7adddfb30
BLAKE2b-256 checksum
How to use checksums
cac55529d0bd07722d5d4563e1828a94e27441e3014092b04e53d6b876ea23fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Mar 4, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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