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
Metadata
Release files for lupaxa-teamsit 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lupaxa_teamsit-0.1.4.tar.gz | 9.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lupaxa_teamsit-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.2 kB
Release files / lupaxa_teamsit-0.1.4.tar.gz
| Download URL | lupaxa_teamsit-0.1.4.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d076ab91d141c4943cf6807e8940140ec764dda16074dd4e894e224ee337fe5
|
|
BLAKE2b-256 checksum How to use checksums |
e76eb39e9ea6bf14867bed5dc6ff5d9a049448a92bb57ad2d2f6d19a935edb90
|
| 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 Sep 30, 2026.
Transparency logRelease files / lupaxa_teamsit-0.1.4-py3-none-any.whl
| Download URL | lupaxa_teamsit-0.1.4-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d267ce1c6dec87e4f670d3c7d3c0729d7ebdab863c86b3be4101f8d17b72ea7
|
|
BLAKE2b-256 checksum How to use checksums |
200c2360a9676897fe25ce4f4a19e350ef6cad9f280bc88ed872a9ce3efdbdf0
|
| 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 Sep 30, 2026.
Transparency log