Skip to main content

Notifications Toolbox

Teamsit

Send Microsoft Teams messages through an incoming webhook.

Requires Python 3.13 or newer. A successful post returns when Teams answers HTTP 200.

Install

pip install lupaxa-teamsit
teamsit --help

CLI

teamsit --webhook "$TEAMS_WEBHOOK_URL" --text "Hello, Teams!"
teamsit --webhook "$TEAMS_WEBHOOK_URL" --title Deploy --color 0078D4 --text "Hello"
teamsit --profile testing --text "Hello, Teams!"
teamsit -p alerts --config "$HOME/work/teamsit.yml" --text "Disk full"
teamsit --webhook "$TEAMS_WEBHOOK_URL" --validate
python -m lupaxa.teamsit --version

The webhook URL must be an Office 365 connector address (https://outlook.office.com/webhook/… or https://outlook.office365.com/webhook/…) or a Teams incoming webhook (https://….webhook.office.com/webhookb2/…). --text, --card, and --validate are mutually exclusive, and one of them is required. Flags override the same fields from the selected profile.

Flag Default Description
--webhook, -w profile value Microsoft Teams incoming webhook URL
--profile, -p — Profile name in the config file
--config ~/.teamsit.yml Config file path
--text, -t — Message text
--title profile value Card title
--color 00FF00 Theme color as 6-digit hex
--card — MessageCard JSON object
--validate — Send a validation message
--timeout, -T 10 Request timeout in seconds
--version — Print the package version and exit

--timeout must be greater than 0. --color is six hex digits, with or without a leading #. Escaped newlines in --text are sent as real line breaks, so Hello\\nthere arrives as two lines. The text is posted as an Office 365 MessageCard: summary and activityTitle use --title when it is set, and themeColor uses --color. --validate posts This is a validation message.

Code When
0 Help, version, or Teams accepted the post
1 The webhook was rejected, or the post failed
2 Command-line usage, a bad config, or argument parsing failed

Config

Profiles live in $HOME/.teamsit.yml. Pass --config to use another file. --config requires --profile.

profiles:
  testing:
    webhook_url: https://outlook.office.com/webhook/YOUR_WEBHOOK_URL
    title: Alerts
    color: "00FF00"
    timeout: 15
  notices:
    webhook_url: https://contoso.webhook.office.com/webhookb2/YOUR_WEBHOOK_URL
    title: Notice

Each profile may set webhook_url, title, color, and timeout. Other keys are rejected. --webhook is required when you do not pass --profile.

Library

from lupaxa.teamsit import Teamsit, load_profile

profile = load_profile("testing")
client = Teamsit(
    profile.webhook_url,
    title=profile.title,
    color=profile.color or "00FF00",
)
client.send_message("Hello, Teams!")
client.send("Hello\\nfrom the library")
client.send_card('{"summary": "Deploy finished", "text": "All jobs passed"}')

send is an alias of send_message. A card posted with send_card receives @type, @context, and themeColor when those fields are absent. load_profile reads $HOME/.teamsit.yml when no path is passed. A missing file, unknown profile, or invalid YAML raises ConfigError.

Development

make init
make python-install-dev
make python-check
The Lupaxa Project Footer

Metadata

Release files for lupaxa-teamsit 0.1.5

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

Source distribution (sdist)

Source distribution for lupaxa-teamsit 0.1.5
File Size Uploaded
lupaxa_teamsit-0.1.5.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lupaxa-teamsit 0.1.5
File Interpreter ABI Platform
lupaxa_teamsit-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 20.2 kB

Release files / lupaxa_teamsit-0.1.5.tar.gz

Download URL lupaxa_teamsit-0.1.5.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5b8e2a167e6495448dcd83204d4b4f8922d868ba602bd4bcc928db4dc43f45bf
BLAKE2b-256 checksum
How to use checksums
90cc27207f4daccf26cc6b014d9ea7385cd05418b584791eb251b28478f14cdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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

Transparency log

Release files / lupaxa_teamsit-0.1.5-py3-none-any.whl

Download URL lupaxa_teamsit-0.1.5-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa499c83772ad2c6e4eefbe55e88bbffa22b769dc10085a2ed9600c6c74e953d
BLAKE2b-256 checksum
How to use checksums
3785083d28b09b8c2f8b2206fb9a2b48eaa394fa5c9c4d65f3029e4a5c587080
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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

Transparency log

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

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