{"id":19430940,"url":"https://github.com/jmousqueton/boamp-alert","last_synced_at":"2026-01-01T21:56:38.880Z","repository":{"id":215522713,"uuid":"739031674","full_name":"JMousqueton/boamp-alert","owner":"JMousqueton","description":"🔔 Script d'alerte Microsoft Teams ou Mattermost  pour les avis de marché ou d'attribution publiés au BOAMP","archived":false,"fork":false,"pushed_at":"2024-07-15T09:31:16.000Z","size":425,"stargazers_count":2,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-15T18:19:21.740Z","etag":null,"topics":["alert","attribution","boamp","json","marche","markdown","mattermost","monitoring","msteams","public","python","python3","rfi","rfp","teams","webhook"],"latest_commit_sha":null,"homepage":"https://www.boamp.fr/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JMousqueton.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-04T16:03:29.000Z","updated_at":"2024-05-23T10:21:21.000Z","dependencies_parsed_at":"2024-01-05T00:14:22.676Z","dependency_job_id":"397be328-808c-4ec3-9645-d9d842159c24","html_url":"https://github.com/JMousqueton/boamp-alert","commit_stats":{"total_commits":59,"total_committers":2,"mean_commits":29.5,"dds":0.03389830508474578,"last_synced_commit":"ebffc0752786e22b26b3c7739e4919d330502957"},"previous_names":["jmousqueton/boamp-alert"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JMousqueton/boamp-alert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JMousqueton%2Fboamp-alert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JMousqueton%2Fboamp-alert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JMousqueton%2Fboamp-alert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JMousqueton%2Fboamp-alert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JMousqueton","download_url":"https://codeload.github.com/JMousqueton/boamp-alert/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JMousqueton%2Fboamp-alert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28164083,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2026-01-01T02:00:06.694Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alert","attribution","boamp","json","marche","markdown","mattermost","monitoring","msteams","public","python","python3","rfi","rfp","teams","webhook"],"created_at":"2024-11-10T14:27:29.162Z","updated_at":"2026-01-01T21:56:38.865Z","avatar_url":"https://github.com/JMousqueton.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# 🔔 BOAMP Alert\n\nCe script Python est conçu pour récupérer les données des marchés publics du BOAMP (Bulletin officiel des annonces des marchés publics) via l'API, analyser les données et envoyer des notifications via [Microsoft Teams](https://teams.microsoft.com) ou [Mattermost](https://mattermost.com/) \nIl est particulièrement utile pour surveiller les appels d'offres publics et les mises à jour associées.\n\n## Fonctionnalités\n\nRécupération des données de l'API BOAMP basée sur une date spécifique.\nAnalyse des données récupérées pour extraire les informations pertinentes.\nEnvoi de notifications à Microsoft Teams avec des informations détaillées sur les appels d'offres publics.\nVariables d'environnement pour une configuration flexible.\n\n\n## Prérequis\n\n- Python 3.10+ \n- Bibliothèques externes : requests, json, pymsteams, datetime, logging, argparse, re, sys, os, load_dotenv, markdownify\n\n\n## Installation\n\n1) Assurez-vous que Python 3.10 minimum est installé sur votre système.\n2) Clonez ou téléchargez ce script sur votre machine locale.\n3) Installez les paquets Python requis :\n\n```\npip3 install -r requirements.txt\n```\n\n## Configuration \n\n1) Créez un fichier .env dans le même répertoire que le script.\n2) Ajoutez les variables d'environnement suivantes au fichier .env :\n\n```\n# Webhook pour les notifications msteams\nMS_TEAMS_WEBHOOK_MARCHE=\nMS_TEAMS_WEBHOOK_ATTRIBUTION=\n# Webhook pour les notifications Mattermost\nMATTERMOST_WEBHOOK_ATTRIBUTION=\nMATTERMOST_WEBHOOK_MARCHE=\n# Mots clefs (cf [.env.sample](.env.sample))\nDESCRIPTEURS=\n# information visuelle uniquement (valeur 2024-2025)\nSEUILMARCHES=\"221 k€\"\n# Seuil pour afficher les icones \nMONTANT1=1000000\nMONTANT2=2000000\nMONTANT3=4000000\n# Envoie de la legende tous les 1ers jour du mois\nLEGENDE=True\n# Nettoyage du répertoire data\nJOURS_AVANT_GZIP=7\nJOURS_AVANT_EFFACEMENT=30\n# Créer un fichier statistiques.json\nSTATISTIQUES=True\n```\n\nOptionnel pour envoyer des notifications pushover.net en cas d'erreur \n```\nPUSH_USER=\nPUSH_API= \n````\n\nPUSH_* are optional, if you have a PUSHOVER.NET account and want to receive error notification\n\n## Utilisation\n\n- Exécutez le script :\n\n```\npython3 boamp.py\n```\nLe script récupérera automatiquement les données pour la journée précédente.\nDes notifications contenant des informations détaillées seront envoyées aux canaux Microsoft Teams configurés.\n\n## Options \n\n```\npython3 boamp.py -h\n\n    ,---.    .---.    .--.           ,---.   \n    | .-.\\  / .-. )  / /\\ \\ |\\    /| | .-.\\  \n    | |-' \\ | | |(_)/ /__\\ \\|(\\  / | | |-' ) \n    | |--. \\| | | | |  __  |(_)\\/  | | |--'  \n    | |`-' /\\ `-' / | |  |)|| \\  / | | |     \n    /( `--'  )---'  |_|  (_)| |\\/| | /(      \n    (__)     (_)             '-'  '-'(__) \n            par Julien Mousqueton / Computacenter         \n        \nusage: boamp.py [-h] [-D] [-n] [-d YYYY-MM-DD] [-s {attribution,ao,rectificatif}] [-l]\n\nScript to fetch and process BOAMP data\n\noptions:\n  -h, --help            show this help message and exit\n  -D, --debug           Active le mode debug (aucun message ne sera envoyé à msteams)\n  -n, --now             Force la date du jour au lieu de J-1\n  -d YYYY-MM-DD, --date YYYY-MM-DD\n                        Spécifie la date du scan au format yyyy-mm-dd\n  -s {attribution,ao,rectificatif}, --select {attribution,ao,rectificatif}\n                        Selection de la nature de l'avis : 'attribution', 'rectificatif' ou 'ao' (Appel d'Offre)\n  -l, --legende         Publie la légende dans le channel des avis de marché\n  -m, --motclef         Affiche tous les mots clefs\n\n\n  ```\n\n## Legende      \n\n💰      Marché supérieur à 1M€*\n\n💰💰    Marché supérieur à 2M€*\n\n💰💰💰  Marché supérieur à 5M€*\n\n💶      Marché européen compris entre 500.0k€** et 1.0M€*\n\n❌       Marché entre 90k€ et 221k€\n\n❌      Marché inférieur à 90k€ (MAPA)\n\n❌      Marché européen inférieur à 500.0k€** \n\n❓      Marché d'un montant inconnu ou compris entre 221k€ et 1M€*\n\n💿      Marché identifié comme un marché logiciel\n\n🧰      Marché identifié comme un marché de maintenance\n\n👥      Marché identifié comme un marché de prestation de service\n\n🆘       Marché identifié comme un marché de d'assistance\n\n💻      Marché identifié comme un marché de matériel\n\n🖨️       Marché identifié comme un marché de matériel d'impression\n\n♻️        Marché identifié comme un marché de consommables\n\n🟢       Avis de marché\n\n🟠       Modification d'un avis de marché\n\n🛑      Annulation d'un avis de marché\n\n🏆      Avis d'attribution\n\n\u003e  \u0026#42; Valeur configurarable dans le fichier .env (cf [.env.sample](.env.sample))\n\u003e  \u0026#42;\u0026#42; La moitié de la valeur de 💰 (soit 1M€ par défaut)\n\n## Exemple\n\n![screenshot](.github/screenshot.png)\n\n## Statistiques \n\nboamp.py renseigne le fichier statistiques.json. \nVous pouvez générer un graphique en utilisant le script ```python3 generatestats.py```.  \n\n![screenshot](.github/stats.png)\n\n\n## Auteur\n\n- [Julien Mousqueton](https://www.github.com/JMousqueton) CTO @ [Computacenter](https://www.computacenter.com)\n\n\n## Remerciements\n\n - Mon collègue et ami Guillaume C. pour les idées et surtout la motivation \n - La communauté Cyber qui m'a permis de me remettre au python avec le projet [Ransomware.live](https://www.ransomware.live)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmousqueton%2Fboamp-alert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjmousqueton%2Fboamp-alert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjmousqueton%2Fboamp-alert/lists"}