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/
├── 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.


LIB URL: https://pypi.org/project/teams-alerter/0.1.0/

How to build and publish ? pip install build twine python -m build twine upload dist/* dans requirements.txt, ajouter teams-alerter==0.1.0 dans le code: from teams_alerter import TeamsAlerter

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.2.0.tar.gz (4.6 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.2.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: teams_alerter-0.2.0.tar.gz
  • Upload date:
  • Size: 4.6 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.2.0.tar.gz
Algorithm Hash digest
SHA256 8e6be4d420be936782d3e57d16e8d0d99f685edaec142d968ec2f0fe0bcccf42
MD5 6c9ca8e7c01b8dbf7e636454caa73ee1
BLAKE2b-256 4802bc5178df1cfe0f7c54f279022c7bf9b1e0616e999f51c3a49992436c9e16

See more details on using hashes here.

File details

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

File metadata

  • Download URL: teams_alerter-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7fb89a7a1bfe041d499d64c35ac015bbb75accaabe1b98fd533d4a288f41c161
MD5 b39d3bb85641299a440c3dc1c7a4f0a0
BLAKE2b-256 3ce11993bfcf58f364b106f055ee5dd9cc01516a7198b82cb361db8e9d33ea99

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