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
.whlfile 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
- Install
twine:
pip install twine
- 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-logginggoogle-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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file teams_alerter-0.1.5.tar.gz.
File metadata
- Download URL: teams_alerter-0.1.5.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26ac677b7bff985c5ee49493343c1eee4a6df3b6579a6d30b3360d98529532c4
|
|
| MD5 |
44d24407a2b158475367ed044ec0634e
|
|
| BLAKE2b-256 |
3a1e373824914212b1c16f5e2ecea457a31bfc7ec926563d6a8182e628a8fa06
|
File details
Details for the file teams_alerter-0.1.5-py3-none-any.whl.
File metadata
- Download URL: teams_alerter-0.1.5-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7554d00b4cdd2e4ded99387a2f4eb6ade01cb1bdcbea27a87ff44de127427491
|
|
| MD5 |
f2c56350fa14d114e7bc74d0ae7c5810
|
|
| BLAKE2b-256 |
ec1d3ad4b95f34538df176187a13176e442b23183fc6be0c42d4facf29051284
|