Skip to main content

Module pour envoyer des alertes Teams via Pub/Sub

Project description

🛠️ Teams Alerter

A lightweight Python module to send alerts to Microsoft Teams via Google Cloud Pub/Sub.


📦 How to Build the Module

Make sure you have the build package installed:

python -m pip install --upgrade build
python -m build

This will generate .whl and .tar.gz files inside the dist/ folder.


🔧 Install the Module Locally

From your project directory (with your virtual environment activated):

pip install ../teams-alerter/dist/teams_alerter-0.1.0-py3-none-any.whl

Adjust the path according to your actual .whl file location.


🚀 How to Use the Module

from teams_alerter import TeamsAlerter

# Example: error handling
try:
    raise RuntimeError("Test error")
except Exception as error:
    TeamsAlerter.handle_error(error, utils)

📤 How to Publish to PyPI

  1. Install twine:
pip install twine
  1. Upload the distribution files:
twine upload dist/*

A PyPI account is required: https://pypi.org/account/register/


📁 Recommended Module Structure

teams-alerter/
├── src/
│   └── teams_alerter/
│       ├── __init__.py
│       ├── core.py
│       └── utils.py
├── pyproject.toml
├── README.md
└── dist/

✅ Requirements

  • Python ≥ 3.8
  • Google Cloud SDK if you are using Pub/Sub
  • Dependencies:
    • google-cloud-logging
    • google-cloud-pubsub

These dependencies are already listed in your pyproject.toml.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

teams_alerter-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

teams_alerter-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file teams_alerter-0.1.0.tar.gz.

File metadata

  • Download URL: teams_alerter-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for teams_alerter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f5282af12c5bb1bad9124eaa4f637db512ccc36fd34ee68983a2f1c1561f3635
MD5 48b15e69c9bba3d7e2c77b1eced3f75f
BLAKE2b-256 063033e84e41fa01c5dfd07f543fa7ed525e104702c50d8f4c718f29bf27c371

See more details on using hashes here.

File details

Details for the file teams_alerter-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: teams_alerter-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for teams_alerter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14e7bc99d47e92292d0d721c0a9c2b472e40f078b6d4a90af830f13b402937f9
MD5 063d47a4f6e8774e7791044a480b88bb
BLAKE2b-256 0e644492ae014e2484ddd9c76e9c323f8180d11f636ea56a1f986b64ae942d2c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page