Skip to main content

Project Logo

The Lupaxa Notifications Toolbox
Part of The Lupaxa Project


lupaxa-teamsit

Send Microsoft Teams messages through an incoming webhook.

Features

  • Post message text as an Office 365 MessageCard, or send a card JSON object
  • Set a title and theme color on each client
  • Keep several webhook profiles in $HOME/.teamsit.yml and select one with --profile
  • Override any profile field with a CLI flag
  • Turn escaped \n sequences in message text into real line breaks
  • Accept Office 365 connector URLs and *.webhook.office.com/webhookb2/ addresses
  • Reject webhook URLs that answer HEAD with a redirect
  • Use the Teamsit library class or the teamsit command

Installation

From PyPI

pip install lupaxa-teamsit

From source (development mode)

pip install -e ".[dev]"

Requires Python 3.13+. Runtime dependencies: requests and PyYAML.

Library quick start

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 from a profile")

client = Teamsit(
    "https://outlook.office.com/webhook/YOUR_WEBHOOK_URL",
    title="Deploy",
    color="0078D4",
)
client.send_message("Hello, Teams!")
client.send_card('{"summary": "Custom card", "text": "Body"}')

CLI quick start

teamsit --help
teamsit --webhook "$TEAMS_WEBHOOK_URL" --text "Hello, Teams!"
teamsit --profile testing --text "Hello, Teams!"
teamsit -p alerts --config "$HOME/work/teamsit.yml" --text "Disk full"

You can also run the CLI as a module:

python -m lupaxa.teamsit --help
python -m lupaxa.teamsit --version

Config

Profiles live in one YAML file. The default path is $HOME/.teamsit.yml. Pass --config when the file lives somewhere else. --config requires --profile. CLI flags override the selected 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. --webhook is required when you do not pass --profile.

Options

  • --webhook, -w: Teams incoming webhook URL; required when --profile is omitted
  • --profile, -p: profile name in the config file
  • --config: config file path; default $HOME/.teamsit.yml
  • --text, -t: message text
  • --card: one MessageCard as a JSON object
  • --validate: send a validation message
  • --title: card title
  • --color: theme color as 6-digit hex; default 00FF00
  • --timeout, -T: request timeout in seconds; default 10
  • --version: print the package version

--text, --card, and --validate are mutually exclusive. One of them is required. CLI flags override the selected profile.

Documentation

Online documentation:

Documentation

Source repository:

GitHub

Serve docs locally

From a clone of the repository:

make mkdocs-serve

Then open the local URL printed by MkDocs in your browser.

Development

Clone the repository and install with Make:

make init                # first-time makefile-skills checkout
make python-install-dev  # editable install with [dev]
make python-check        # lint, type-check, and test
The Lupaxa Project Footer

Release files for lupaxa-teamsit 0.1.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 lupaxa-teamsit 0.1.0
File Size Uploaded
lupaxa_teamsit-0.1.0.tar.gz 9.3 kB Details

Built distribution (wheel)

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

Total release size: 20.5 kB

Release files / lupaxa_teamsit-0.1.0.tar.gz

Download URL lupaxa_teamsit-0.1.0.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
37b63dc901e411e8806b2f063cda304d1d72c74f5e110ff07bed2e4a6e9d4db8
BLAKE2b-256 checksum
How to use checksums
8d447434db02ab6d95d6a2d48c1a67e78e5f3b180ab7f6ec86db2d98cfca9d2b
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 22, 2026.

Transparency log

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

Download URL lupaxa_teamsit-0.1.0-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bea230d1df4e54fd8ccf4be3bde8b7f1aab25d7ba6f65e4fc7f22fd1fd9284e3
BLAKE2b-256 checksum
How to use checksums
a35a143050db53e9b53f6760261941a1b27433f0405060d0c9ae6440964b63d7
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 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

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