Spaces:
Runtime error
Runtime error
chrisaka commited on
Commit ·
e4d23c9
1
Parent(s): d68ff91
feat: Implement asynchronous email notifications for Flash CRs and introduce core email and scheduling services.
Browse files- .dockerignore +27 -0
- Dockerfile +32 -0
- README.md +15 -59
- app/__pycache__/main.cpython-313.pyc +0 -0
- app/core/__pycache__/email.cpython-313.pyc +0 -0
- app/core/__pycache__/scheduler.cpython-313.pyc +0 -0
- app/core/email.py +139 -0
- app/core/scheduler.py +112 -0
- app/main.py +45 -1
- app/routers/__pycache__/flash_cr.cpython-313.pyc +0 -0
- app/routers/flash_cr.py +65 -11
- pyproject.toml +1 -0
- requirements.txt +3 -2
- uv.lock +35 -0
.dockerignore
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Git
|
| 2 |
+
.git
|
| 3 |
+
.gitignore
|
| 4 |
+
|
| 5 |
+
# Python env
|
| 6 |
+
.env
|
| 7 |
+
.venv
|
| 8 |
+
venv/
|
| 9 |
+
env/
|
| 10 |
+
__pycache__/
|
| 11 |
+
*.pyc
|
| 12 |
+
*.pyo
|
| 13 |
+
*.pyd
|
| 14 |
+
|
| 15 |
+
# Supabase
|
| 16 |
+
supabase/
|
| 17 |
+
|
| 18 |
+
# IDE
|
| 19 |
+
.vscode/
|
| 20 |
+
.idea/
|
| 21 |
+
|
| 22 |
+
# Testing
|
| 23 |
+
.pytest_cache/
|
| 24 |
+
|
| 25 |
+
# Divers
|
| 26 |
+
*.log
|
| 27 |
+
.DS_Store
|
Dockerfile
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Dockerfile pour FastAPI
|
| 2 |
+
# Utilise une image allégée
|
| 3 |
+
FROM python:3.11-slim
|
| 4 |
+
|
| 5 |
+
# Empêche la création des fichiers .pyc bytecode
|
| 6 |
+
ENV PYTHONDONTWRITEBYTECODE=1
|
| 7 |
+
# Force les logs Pythons à aller directement vers stdout/stderr au lieu d'être bufférisés
|
| 8 |
+
ENV PYTHONUNBUFFERED=1
|
| 9 |
+
|
| 10 |
+
WORKDIR /app
|
| 11 |
+
|
| 12 |
+
# Installation de curl pour le healthcheck et d'autres utilitaires légers si nécessaire
|
| 13 |
+
RUN apt-get update && apt-get install -y --no-install-recommends curl \
|
| 14 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
+
|
| 16 |
+
# Copie des requirements.txt
|
| 17 |
+
COPY requirements.txt .
|
| 18 |
+
|
| 19 |
+
# Installation des dépendances depuis requirements.txt
|
| 20 |
+
# Nous utilisons pip via l'image standard au lieu de 'uv' pour éviter de compliquer le build Docker,
|
| 21 |
+
# pip install -r requirements.txt est parfaitement suffisant pour cette configuration
|
| 22 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 23 |
+
|
| 24 |
+
# Copie de l'intégralité du code (app, logs, etc)
|
| 25 |
+
COPY . .
|
| 26 |
+
|
| 27 |
+
# Définition du port dynamique attendu par la plupart des PaaS (Render, Heroku)
|
| 28 |
+
EXPOSE 8000
|
| 29 |
+
|
| 30 |
+
# Démarrage de Gunicorn avec le worker Uvicorn (adapté pour la production)
|
| 31 |
+
# On lie l'adresse et le port (0.0.0.0 au port fourni par Render)
|
| 32 |
+
CMD ["gunicorn", "app.main:app", "--workers", "1", "--worker-class", "uvicorn.workers.UvicornWorker", "--bind", "0.0.0.0:8000"]
|
README.md
CHANGED
|
@@ -721,75 +721,31 @@ Tous les endpoints de liste supportent la pagination via query params :
|
|
| 721 |
|
| 722 |
## 13. Rappels automatiques d'audience
|
| 723 |
|
| 724 |
-
Trois emails sont
|
| 725 |
-
|
|
|
|
|
|
|
| 726 |
|
| 727 |
-
|
| 728 |
-
|
| 729 |
-
| J-7 | `[Dedalys] Audience dans 7 jours — [Nom dossier]` |
|
| 730 |
-
| J-3 | `[Dedalys] Audience dans 3 jours — [Nom dossier]` |
|
| 731 |
-
| J-1 | `[Dedalys] Audience demain — [Nom dossier]` |
|
| 732 |
|
| 733 |
-
|
| 734 |
-
|
| 735 |
-
- Titre du dossier
|
| 736 |
-
- Date et heure de l'audience
|
| 737 |
-
- Juridiction
|
| 738 |
-
- Lien direct vers l'audience dans Dedalys
|
| 739 |
-
|
| 740 |
-
**Destinataire :** l'avocat assigné à l'audience (`avocat_assigne_id`).
|
| 741 |
-
|
| 742 |
-
**Implémentation :** APScheduler exécute un job toutes les heures qui interroge les audiences
|
| 743 |
-
à venir et envoie les rappels manquants. Chaque rappel envoyé est marqué en base
|
| 744 |
-
(`rappel_j7_envoye`, `rappel_j3_envoye`, `rappel_j1_envoye`) pour éviter les doublons.
|
| 745 |
-
|
| 746 |
-
**Variables d'environnement requises :**
|
| 747 |
-
|
| 748 |
-
```env
|
| 749 |
-
RESEND_API_KEY=re_...
|
| 750 |
-
EMAIL_FROM=noreply@dedalys.ci
|
| 751 |
-
```
|
| 752 |
|
| 753 |
---
|
| 754 |
|
| 755 |
## 14. Flash CR — Email automatique client
|
| 756 |
|
| 757 |
-
|
| 758 |
-
|
| 759 |
|
| 760 |
-
|
| 761 |
|
| 762 |
-
|
| 763 |
-
|
| 764 |
-
|
|
|
|
| 765 |
|
| 766 |
-
|
| 767 |
-
|
| 768 |
-
| Valeur | Description | Prochaine date requise |
|
| 769 |
-
| ------------------ | --------------------------------------- | ---------------------- |
|
| 770 |
-
| `decision_rendue` | Le juge a rendu sa décision | Non |
|
| 771 |
-
| `mise_en_delibere` | Décision reportée à une date ultérieure | **Oui** |
|
| 772 |
-
| `renvoi` | Affaire renvoyée | **Oui** |
|
| 773 |
-
| `autre` | Autre résultat (préciser dans `notes`) | Non |
|
| 774 |
-
|
| 775 |
-
### Email automatique
|
| 776 |
-
|
| 777 |
-
**Destinataires :** email principal du client lié au dossier + points de contact du dossier.
|
| 778 |
-
|
| 779 |
-
**Template :**
|
| 780 |
-
|
| 781 |
-
```
|
| 782 |
-
Objet : Compte-rendu d'audience — [Titre dossier] — [Date]
|
| 783 |
-
|
| 784 |
-
Corps : [Salutation personnalisée],
|
| 785 |
-
Suite à l'audience du [date] devant [juridiction],
|
| 786 |
-
[résumé de la décision].
|
| 787 |
-
[Si mise_en_delibere ou renvoi : Prochaine audience fixée au [date].]
|
| 788 |
-
[Notes complémentaires si renseignées.]
|
| 789 |
-
|
| 790 |
-
Cordialement,
|
| 791 |
-
[Nom du cabinet]
|
| 792 |
-
```
|
| 793 |
|
| 794 |
---
|
| 795 |
|
|
|
|
| 721 |
|
| 722 |
## 13. Rappels automatiques d'audience
|
| 723 |
|
| 724 |
+
Trois emails automatiques sont envoyés avant chaque audience :
|
| 725 |
+
J-7 : 'Audience dans 7 jours — [Nom dossier]'
|
| 726 |
+
J-3 : 'Audience dans 3 jours — [Nom dossier]'
|
| 727 |
+
J-1 : 'Audience demain — [Nom dossier]'
|
| 728 |
|
| 729 |
+
Contenu de l'email : titre du dossier, date/heure,
|
| 730 |
+
juridiction, lien direct vers l'audience dans Dedalys.
|
|
|
|
|
|
|
|
|
|
| 731 |
|
| 732 |
+
Implémentation : Resend + APScheduler
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 733 |
|
| 734 |
---
|
| 735 |
|
| 736 |
## 14. Flash CR — Email automatique client
|
| 737 |
|
| 738 |
+
À la création d'un Flash CR, si 'envoyer_email = true'
|
| 739 |
+
(valeur par défaut), un email est automatiquement envoyé.
|
| 740 |
|
| 741 |
+
Destinataires : email principal du client + contacts du dossier.
|
| 742 |
|
| 743 |
+
Template :
|
| 744 |
+
Objet : Compte-rendu d'audience — [Nom dossier] — [Date]
|
| 745 |
+
Corps : Salutation, résumé de la décision, prochaine date
|
| 746 |
+
si renvoi ou mise_en_delibere, notes, signature.
|
| 747 |
|
| 748 |
+
Un seul Flash CR par audience (HTTP 409 si CR déjà existant).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 749 |
|
| 750 |
---
|
| 751 |
|
app/__pycache__/main.cpython-313.pyc
CHANGED
|
Binary files a/app/__pycache__/main.cpython-313.pyc and b/app/__pycache__/main.cpython-313.pyc differ
|
|
|
app/core/__pycache__/email.cpython-313.pyc
ADDED
|
Binary file (5.36 kB). View file
|
|
|
app/core/__pycache__/scheduler.cpython-313.pyc
ADDED
|
Binary file (5.09 kB). View file
|
|
|
app/core/email.py
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Dedalys Backend — Service Email
|
| 3 |
+
Gestion des envois d'emails transactionnels via Resend.
|
| 4 |
+
"""
|
| 5 |
+
|
| 6 |
+
import logging
|
| 7 |
+
from typing import List, Optional, Dict, Any
|
| 8 |
+
from datetime import datetime
|
| 9 |
+
import resend
|
| 10 |
+
|
| 11 |
+
from app.core.config import settings
|
| 12 |
+
|
| 13 |
+
logger = logging.getLogger(__name__)
|
| 14 |
+
|
| 15 |
+
# Initialisation de la clé d'API Resend
|
| 16 |
+
if settings.RESEND_API_KEY:
|
| 17 |
+
resend.api_key = settings.RESEND_API_KEY
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
async def send_email_async(to: List[str], subject: str, html_body: str) -> bool:
|
| 21 |
+
"""Fonction générique pour envoyer un email asynchrone via l'API Resend."""
|
| 22 |
+
if not settings.RESEND_API_KEY:
|
| 23 |
+
logger.warning(
|
| 24 |
+
f"RESEND_API_KEY manquant. L'email vers {to} n'a pas pu être envoyé.")
|
| 25 |
+
return False
|
| 26 |
+
|
| 27 |
+
try:
|
| 28 |
+
response = resend.Emails.send({
|
| 29 |
+
"from": settings.EMAIL_FROM,
|
| 30 |
+
"to": to,
|
| 31 |
+
"subject": subject,
|
| 32 |
+
"html": html_body
|
| 33 |
+
})
|
| 34 |
+
logger.info(f"Email envoyé avec succès à {to}: {response}")
|
| 35 |
+
return True
|
| 36 |
+
except Exception as e:
|
| 37 |
+
logger.error(f"Erreur lors de l'envoi de l'email à {to}: {e}")
|
| 38 |
+
return False
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
async def send_audience_reminder(
|
| 42 |
+
avocat_email: str,
|
| 43 |
+
avocat_nom: str,
|
| 44 |
+
dossier_titre: str,
|
| 45 |
+
audience_date: str,
|
| 46 |
+
audience_heure: str,
|
| 47 |
+
juridiction: str,
|
| 48 |
+
delay_type: str, # "J-7", "J-3", ou "J-1"
|
| 49 |
+
) -> bool:
|
| 50 |
+
"""Envoie un email de rappel d'audience (J-7, J-3, J-1) à l'avocat assigné."""
|
| 51 |
+
|
| 52 |
+
delays_text = {
|
| 53 |
+
"J-7": "dans 7 jours",
|
| 54 |
+
"J-3": "dans 3 jours",
|
| 55 |
+
"J-1": "demain"
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
delay_str = delays_text.get(delay_type, delay_type)
|
| 59 |
+
subject = f"[Dedalys] Audience {delay_str} — [{dossier_titre}]"
|
| 60 |
+
|
| 61 |
+
# URL fictive pour le lien direct (en fonction du FRONTEND_URL de la config)
|
| 62 |
+
frontend_url = settings.FRONTEND_URL.rstrip('/')
|
| 63 |
+
audience_link = f"{frontend_url}/audiences"
|
| 64 |
+
|
| 65 |
+
html_body = f"""
|
| 66 |
+
<p>Bonjour Maître {avocat_nom},</p>
|
| 67 |
+
|
| 68 |
+
<p>Ceci est un rappel vous informant qu'une audience aura lieu <strong>{delay_str}</strong> concernant le dossier <strong>{dossier_titre}</strong>.</p>
|
| 69 |
+
|
| 70 |
+
<ul>
|
| 71 |
+
<li><strong>Date :</strong> {audience_date}</li>
|
| 72 |
+
<li><strong>Heure :</strong> {audience_heure}</li>
|
| 73 |
+
<li><strong>Juridiction :</strong> {juridiction or 'Non spécifiée'}</li>
|
| 74 |
+
</ul>
|
| 75 |
+
|
| 76 |
+
<p>Vous pouvez consulter les détails en vous connectant à votre espace Dedalys :<br>
|
| 77 |
+
<a href="{audience_link}">Aller au planning d'audiences</a></p>
|
| 78 |
+
|
| 79 |
+
<br>
|
| 80 |
+
<p>Cordialement,<br>L'équipe Dedalys</p>
|
| 81 |
+
"""
|
| 82 |
+
|
| 83 |
+
return await send_email_async(
|
| 84 |
+
to=[avocat_email],
|
| 85 |
+
subject=subject,
|
| 86 |
+
html_body=html_body
|
| 87 |
+
)
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
async def send_flash_cr_email(
|
| 91 |
+
destinataires: List[str],
|
| 92 |
+
dossier_titre: str,
|
| 93 |
+
date_audience: str,
|
| 94 |
+
juridiction: str,
|
| 95 |
+
type_decision: str,
|
| 96 |
+
prochaine_date: Optional[str] = None,
|
| 97 |
+
notes: Optional[str] = None
|
| 98 |
+
) -> bool:
|
| 99 |
+
"""Envoie automatiquement le compte-rendu 'Flash CR' aux clients après une audience."""
|
| 100 |
+
|
| 101 |
+
# Formatage de la date en chaîne si ce n'est pas déjà le cas
|
| 102 |
+
if isinstance(date_audience, datetime):
|
| 103 |
+
date_audience = date_audience.strftime("%d/%m/%Y")
|
| 104 |
+
|
| 105 |
+
subject = f"Compte-rendu d'audience — [{dossier_titre}] — {date_audience}"
|
| 106 |
+
|
| 107 |
+
# Textes pour le résumé de la décision
|
| 108 |
+
decision_texts = {
|
| 109 |
+
"decision_rendue": "Le juge a rendu sa décision.",
|
| 110 |
+
"mise_en_delibere": "La décision a été mise en délibéré.",
|
| 111 |
+
"renvoi": "L'affaire a été renvoyée.",
|
| 112 |
+
"autre": "Mise à jour sur votre dossier."
|
| 113 |
+
}
|
| 114 |
+
resume_decision = decision_texts.get(type_decision, type_decision)
|
| 115 |
+
|
| 116 |
+
prochaine_date_html = ""
|
| 117 |
+
if type_decision in ("mise_en_delibere", "renvoi") and prochaine_date:
|
| 118 |
+
prochaine_date_html = f"<p><strong>Prochaine audience fixée au {prochaine_date}.</strong></p>"
|
| 119 |
+
|
| 120 |
+
notes_html = f"<p><em>Notes complémentaires :</em><br>{notes}</p>" if notes else ""
|
| 121 |
+
|
| 122 |
+
html_body = f"""
|
| 123 |
+
<p>Bonjour,</p>
|
| 124 |
+
|
| 125 |
+
<p>Suite à l'audience du <strong>{date_audience}</strong> devant <strong>{juridiction or 'le Tribunal'}</strong>,<br>
|
| 126 |
+
<strong>{resume_decision}</strong></p>
|
| 127 |
+
|
| 128 |
+
{prochaine_date_html}
|
| 129 |
+
{notes_html}
|
| 130 |
+
|
| 131 |
+
<br>
|
| 132 |
+
<p>Cordialement,<br>Votre Cabinet</p>
|
| 133 |
+
"""
|
| 134 |
+
|
| 135 |
+
return await send_email_async(
|
| 136 |
+
to=destinataires,
|
| 137 |
+
subject=subject,
|
| 138 |
+
html_body=html_body
|
| 139 |
+
)
|
app/core/scheduler.py
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Dedalys Backend — Scheduler
|
| 3 |
+
Tâches planifiées via APScheduler.
|
| 4 |
+
MVP: Envoi de rappels automatiques d'audiences (J-7, J-3, J-1).
|
| 5 |
+
"""
|
| 6 |
+
|
| 7 |
+
import logging
|
| 8 |
+
from datetime import datetime, date, timedelta, timezone
|
| 9 |
+
from apscheduler.schedulers.asyncio import AsyncIOScheduler
|
| 10 |
+
from apscheduler.triggers.cron import CronTrigger
|
| 11 |
+
|
| 12 |
+
from app.core.supabase import supabase_admin
|
| 13 |
+
from app.core.email import send_audience_reminder
|
| 14 |
+
|
| 15 |
+
logger = logging.getLogger(__name__)
|
| 16 |
+
|
| 17 |
+
# Instance globale du scheduler
|
| 18 |
+
scheduler = AsyncIOScheduler(timezone=timezone.utc)
|
| 19 |
+
|
| 20 |
+
async def check_and_send_audience_reminders():
|
| 21 |
+
"""
|
| 22 |
+
Vérifie les audiences à venir à J-7, J-3 et J-1,
|
| 23 |
+
puis envoie les emails de rappel et met à jour les flags.
|
| 24 |
+
"""
|
| 25 |
+
aujourd_hui = date.today()
|
| 26 |
+
logger.info("Début de l'exécution de la tâche planifiée: check_and_send_audience_reminders")
|
| 27 |
+
|
| 28 |
+
try:
|
| 29 |
+
# Récupérer les audiences qui n'ont pas encore eu TOUS leurs rappels envoyés
|
| 30 |
+
# et dont la date est supérieure ou égale à aujourd'hui
|
| 31 |
+
response = (
|
| 32 |
+
supabase_admin.table("audiences")
|
| 33 |
+
.select("*, dossiers(titre), utilisateurs(email, nom)")
|
| 34 |
+
.eq("type", "audience") # Pas de rappels pour "reunion"
|
| 35 |
+
.eq("is_archived", False)
|
| 36 |
+
.gte("date", str(aujourd_hui))
|
| 37 |
+
.execute()
|
| 38 |
+
)
|
| 39 |
+
audiences = response.data or []
|
| 40 |
+
|
| 41 |
+
for audience in audiences:
|
| 42 |
+
audience_date_str = audience.get("date")
|
| 43 |
+
if not audience_date_str:
|
| 44 |
+
continue
|
| 45 |
+
|
| 46 |
+
audience_date = datetime.strptime(audience_date_str, "%Y-%m-%d").date()
|
| 47 |
+
delta_days = (audience_date - aujourd_hui).days
|
| 48 |
+
|
| 49 |
+
# Récupérer l'information sur l'avocat et le dossier joint
|
| 50 |
+
avocat = audience.get("utilisateurs", {})
|
| 51 |
+
dossier = audience.get("dossiers", {})
|
| 52 |
+
|
| 53 |
+
avocat_email = avocat.get("email")
|
| 54 |
+
avocat_nom = avocat.get("nom", "Confrère")
|
| 55 |
+
dossier_titre = dossier.get("titre", "Dossier sans titre")
|
| 56 |
+
juridiction = audience.get("juridiction", "Non spécifiée")
|
| 57 |
+
audience_heure = audience.get("heure", "Heure non précisée")
|
| 58 |
+
|
| 59 |
+
if not avocat_email:
|
| 60 |
+
continue
|
| 61 |
+
|
| 62 |
+
update_flags = {}
|
| 63 |
+
delay_type = None
|
| 64 |
+
|
| 65 |
+
if delta_days == 7 and not audience.get("rappel_j7_envoye"):
|
| 66 |
+
delay_type = "J-7"
|
| 67 |
+
update_flags["rappel_j7_envoye"] = True
|
| 68 |
+
elif delta_days == 3 and not audience.get("rappel_j3_envoye"):
|
| 69 |
+
delay_type = "J-3"
|
| 70 |
+
update_flags["rappel_j3_envoye"] = True
|
| 71 |
+
elif delta_days == 1 and not audience.get("rappel_j1_envoye"):
|
| 72 |
+
delay_type = "J-1"
|
| 73 |
+
update_flags["rappel_j1_envoye"] = True
|
| 74 |
+
|
| 75 |
+
# Si on a un rappel à envoyer aujourd'hui pour cette audience
|
| 76 |
+
if delay_type:
|
| 77 |
+
logger.info(f"Envoi rappel {delay_type} pour audience {audience['id']}")
|
| 78 |
+
success = await send_audience_reminder(
|
| 79 |
+
avocat_email=avocat_email,
|
| 80 |
+
avocat_nom=avocat_nom,
|
| 81 |
+
dossier_titre=dossier_titre,
|
| 82 |
+
audience_date=audience_date_str,
|
| 83 |
+
audience_heure=audience_heure[:5] if audience_heure else '', # Coupe secondes
|
| 84 |
+
juridiction=juridiction,
|
| 85 |
+
delay_type=delay_type
|
| 86 |
+
)
|
| 87 |
+
|
| 88 |
+
# Mettre à jour Supabase si l'envoi a réussi
|
| 89 |
+
if success:
|
| 90 |
+
supabase_admin.table("audiences").update(update_flags).eq("id", audience["id"]).execute()
|
| 91 |
+
|
| 92 |
+
logger.info("Fin de la tâche planifiée check_and_send_audience_reminders")
|
| 93 |
+
|
| 94 |
+
except Exception as e:
|
| 95 |
+
logger.error(f"Erreur lors de l'exécution des rappels d'audience: {e}")
|
| 96 |
+
|
| 97 |
+
def start_scheduler():
|
| 98 |
+
"""Démarre le planificateur de tâches asynchrones."""
|
| 99 |
+
# Exécuter la tâche de vérification toutes les heures (MVP)
|
| 100 |
+
scheduler.add_job(
|
| 101 |
+
check_and_send_audience_reminders,
|
| 102 |
+
trigger=CronTrigger(minute=0), # Toutes les heures à la minute 0
|
| 103 |
+
id="audience_reminders_job",
|
| 104 |
+
replace_existing=True
|
| 105 |
+
)
|
| 106 |
+
scheduler.start()
|
| 107 |
+
logger.info("Scheduler démarré : tâches planifiées activées.")
|
| 108 |
+
|
| 109 |
+
def stop_scheduler():
|
| 110 |
+
"""Arrête proprement le planificateur."""
|
| 111 |
+
scheduler.shutdown()
|
| 112 |
+
logger.info("Scheduler arrêté.")
|
app/main.py
CHANGED
|
@@ -3,10 +3,14 @@ Dedalys Backend — Point d'entrée FastAPI
|
|
| 3 |
Solution de gestion pour cabinets et directions juridiques.
|
| 4 |
"""
|
| 5 |
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
| 7 |
from fastapi.middleware.cors import CORSMiddleware
|
| 8 |
|
| 9 |
from app.core.config import settings
|
|
|
|
| 10 |
from app.routers import (
|
| 11 |
auth,
|
| 12 |
espaces,
|
|
@@ -21,6 +25,18 @@ from app.routers import (
|
|
| 21 |
)
|
| 22 |
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
# ══════════════════════════════════════════════════════════════════════════════
|
| 25 |
# APPLICATION
|
| 26 |
# ══════════════════════════════════════════════════════════════════════════════
|
|
@@ -31,6 +47,7 @@ app = FastAPI(
|
|
| 31 |
version="1.0.0",
|
| 32 |
docs_url="/api/v1/docs" if settings.is_development else None,
|
| 33 |
redoc_url="/api/v1/redoc" if settings.is_development else None,
|
|
|
|
| 34 |
)
|
| 35 |
|
| 36 |
|
|
@@ -47,6 +64,33 @@ app.add_middleware(
|
|
| 47 |
)
|
| 48 |
|
| 49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
# ══════════════════════════════════════════════════════════════════════════════
|
| 51 |
# ROUTERS — TOUS SOUS /api/v1
|
| 52 |
# ══════════════════════════════════════════════════════════════════════════════
|
|
|
|
| 3 |
Solution de gestion pour cabinets et directions juridiques.
|
| 4 |
"""
|
| 5 |
|
| 6 |
+
import time
|
| 7 |
+
import logging
|
| 8 |
+
from contextlib import asynccontextmanager
|
| 9 |
+
from fastapi import FastAPI, Request
|
| 10 |
from fastapi.middleware.cors import CORSMiddleware
|
| 11 |
|
| 12 |
from app.core.config import settings
|
| 13 |
+
from app.core.scheduler import start_scheduler, stop_scheduler
|
| 14 |
from app.routers import (
|
| 15 |
auth,
|
| 16 |
espaces,
|
|
|
|
| 25 |
)
|
| 26 |
|
| 27 |
|
| 28 |
+
# ══════════════════════════════════════════════════════════════════════════════
|
| 29 |
+
# LIFESPAN (Démarrage / Arrêt)
|
| 30 |
+
# ══════════════════════════════════════════════════════════════════════════════
|
| 31 |
+
|
| 32 |
+
@asynccontextmanager
|
| 33 |
+
async def lifespan(app: FastAPI):
|
| 34 |
+
# Démarrage
|
| 35 |
+
start_scheduler()
|
| 36 |
+
yield
|
| 37 |
+
# Arrêt
|
| 38 |
+
stop_scheduler()
|
| 39 |
+
|
| 40 |
# ══════════════════════════════════════════════════════════════════════════════
|
| 41 |
# APPLICATION
|
| 42 |
# ══════════════════════════════════════════════════════════════════════════════
|
|
|
|
| 47 |
version="1.0.0",
|
| 48 |
docs_url="/api/v1/docs" if settings.is_development else None,
|
| 49 |
redoc_url="/api/v1/redoc" if settings.is_development else None,
|
| 50 |
+
lifespan=lifespan,
|
| 51 |
)
|
| 52 |
|
| 53 |
|
|
|
|
| 64 |
)
|
| 65 |
|
| 66 |
|
| 67 |
+
# ══════════════════════════════════════════════════════════════════════════════
|
| 68 |
+
# MIDDLEWARE LOGGING
|
| 69 |
+
# ══════════════════════════════════════════════════════════════════════════════
|
| 70 |
+
|
| 71 |
+
logging.basicConfig(level=logging.INFO)
|
| 72 |
+
logger = logging.getLogger(__name__)
|
| 73 |
+
|
| 74 |
+
@app.middleware("http")
|
| 75 |
+
async def log_requests(request: Request, call_next):
|
| 76 |
+
start_time = time.time()
|
| 77 |
+
|
| 78 |
+
# Process request
|
| 79 |
+
response = await call_next(request)
|
| 80 |
+
|
| 81 |
+
process_time = time.time() - start_time
|
| 82 |
+
|
| 83 |
+
log_message = (
|
| 84 |
+
f"{request.method} || "
|
| 85 |
+
f"{request.url.path} || "
|
| 86 |
+
f"{response.status_code} || "
|
| 87 |
+
f"{process_time:.4f}s"
|
| 88 |
+
)
|
| 89 |
+
logger.info(log_message)
|
| 90 |
+
|
| 91 |
+
return response
|
| 92 |
+
|
| 93 |
+
|
| 94 |
# ══════════════════════════════════════════════════════════════════════════════
|
| 95 |
# ROUTERS — TOUS SOUS /api/v1
|
| 96 |
# ══════════════════════════════════════════════════════════════════════════════
|
app/routers/__pycache__/flash_cr.cpython-313.pyc
CHANGED
|
Binary files a/app/routers/__pycache__/flash_cr.cpython-313.pyc and b/app/routers/__pycache__/flash_cr.cpython-313.pyc differ
|
|
|
app/routers/flash_cr.py
CHANGED
|
@@ -7,13 +7,14 @@ from typing import List
|
|
| 7 |
from uuid import UUID
|
| 8 |
from datetime import datetime, timezone, date
|
| 9 |
|
| 10 |
-
from fastapi import APIRouter, HTTPException, Depends
|
| 11 |
|
| 12 |
from app.models.schemas import (
|
| 13 |
FlashCRCreate, FlashCRUpdate, FlashCRResponse, MessageResponse,
|
| 14 |
)
|
| 15 |
from app.core.auth import require_permission, CurrentUser
|
| 16 |
from app.core.supabase import supabase_admin
|
|
|
|
| 17 |
|
| 18 |
router = APIRouter(prefix="/flash-cr", tags=["Flash CR"])
|
| 19 |
|
|
@@ -25,6 +26,7 @@ router = APIRouter(prefix="/flash-cr", tags=["Flash CR"])
|
|
| 25 |
@router.post("/", response_model=FlashCRResponse, status_code=201)
|
| 26 |
async def create_flash_cr(
|
| 27 |
payload: FlashCRCreate,
|
|
|
|
| 28 |
espace_user: CurrentUser = Depends(require_permission("flash_cr:write")),
|
| 29 |
):
|
| 30 |
"""
|
|
@@ -102,17 +104,69 @@ async def create_flash_cr(
|
|
| 102 |
|
| 103 |
flash_cr = response.data[0]
|
| 104 |
|
| 105 |
-
# MVP — Envoi email si envoyer_email=True
|
| 106 |
-
# TODO: Implémenter l'envoi via Resend dans core/email.py
|
| 107 |
if payload.envoyer_email:
|
| 108 |
-
#
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
|
| 117 |
return flash_cr
|
| 118 |
|
|
|
|
| 7 |
from uuid import UUID
|
| 8 |
from datetime import datetime, timezone, date
|
| 9 |
|
| 10 |
+
from fastapi import APIRouter, HTTPException, Depends, BackgroundTasks
|
| 11 |
|
| 12 |
from app.models.schemas import (
|
| 13 |
FlashCRCreate, FlashCRUpdate, FlashCRResponse, MessageResponse,
|
| 14 |
)
|
| 15 |
from app.core.auth import require_permission, CurrentUser
|
| 16 |
from app.core.supabase import supabase_admin
|
| 17 |
+
from app.core.email import send_flash_cr_email
|
| 18 |
|
| 19 |
router = APIRouter(prefix="/flash-cr", tags=["Flash CR"])
|
| 20 |
|
|
|
|
| 26 |
@router.post("/", response_model=FlashCRResponse, status_code=201)
|
| 27 |
async def create_flash_cr(
|
| 28 |
payload: FlashCRCreate,
|
| 29 |
+
background_tasks: BackgroundTasks,
|
| 30 |
espace_user: CurrentUser = Depends(require_permission("flash_cr:write")),
|
| 31 |
):
|
| 32 |
"""
|
|
|
|
| 104 |
|
| 105 |
flash_cr = response.data[0]
|
| 106 |
|
|
|
|
|
|
|
| 107 |
if payload.envoyer_email:
|
| 108 |
+
# Récupérer les informations du dossier et du client
|
| 109 |
+
try:
|
| 110 |
+
dossier_query = (
|
| 111 |
+
supabase_admin.table("dossiers")
|
| 112 |
+
.select("titre, client_id, clients(email_principal)")
|
| 113 |
+
.eq("id", audience.data["dossier_id"])
|
| 114 |
+
.maybe_single()
|
| 115 |
+
.execute()
|
| 116 |
+
)
|
| 117 |
+
|
| 118 |
+
dossier = dossier_query.data
|
| 119 |
+
destinataires = []
|
| 120 |
+
dossier_titre = ""
|
| 121 |
+
|
| 122 |
+
if dossier:
|
| 123 |
+
dossier_titre = dossier.get("titre", "Dossier sans titre")
|
| 124 |
+
client = dossier.get("clients", {})
|
| 125 |
+
|
| 126 |
+
# Email principal du client
|
| 127 |
+
email_principal = client.get("email_principal")
|
| 128 |
+
if email_principal:
|
| 129 |
+
destinataires.append(email_principal)
|
| 130 |
+
|
| 131 |
+
# Récupérer les points de contacts du client (qui ne sont pas archivés)
|
| 132 |
+
contacts_query = (
|
| 133 |
+
supabase_admin.table("points_de_contact")
|
| 134 |
+
.select("email")
|
| 135 |
+
.eq("client_id", dossier["client_id"])
|
| 136 |
+
.eq("is_archived", False)
|
| 137 |
+
.execute()
|
| 138 |
+
)
|
| 139 |
+
|
| 140 |
+
for contact in contacts_query.data or []:
|
| 141 |
+
if contact.get("email") and contact["email"] not in destinataires:
|
| 142 |
+
destinataires.append(contact["email"])
|
| 143 |
+
|
| 144 |
+
# Envoi effectif asynchrone via BackgroundTasks
|
| 145 |
+
if destinataires:
|
| 146 |
+
background_tasks.add_task(
|
| 147 |
+
send_flash_cr_email,
|
| 148 |
+
destinataires=destinataires,
|
| 149 |
+
dossier_titre=dossier_titre,
|
| 150 |
+
date_audience=audience.data["date"],
|
| 151 |
+
juridiction=audience.data.get("juridiction", ""),
|
| 152 |
+
type_decision=payload.type_decision,
|
| 153 |
+
prochaine_date=str(payload.prochaine_date) if payload.prochaine_date else None,
|
| 154 |
+
notes=payload.notes_rapides
|
| 155 |
+
)
|
| 156 |
+
|
| 157 |
+
# Mettre à jour en base pour l'enregistrer direct
|
| 158 |
+
supabase_admin.table("flash_cr").update({
|
| 159 |
+
"email_envoye": True,
|
| 160 |
+
"email_envoye_at": datetime.now(timezone.utc).isoformat(),
|
| 161 |
+
}).eq("id", flash_cr["id"]).execute()
|
| 162 |
+
|
| 163 |
+
flash_cr["email_envoye"] = True
|
| 164 |
+
flash_cr["email_envoye_at"] = datetime.now(timezone.utc).isoformat()
|
| 165 |
+
|
| 166 |
+
except Exception as e:
|
| 167 |
+
# On log l'erreur pour ne pas bloquer le renvoi de la réponse de création Flash CR
|
| 168 |
+
import logging
|
| 169 |
+
logging.getLogger(__name__).error(f"Erreur préparation email Flash CR: {e}")
|
| 170 |
|
| 171 |
return flash_cr
|
| 172 |
|
pyproject.toml
CHANGED
|
@@ -5,6 +5,7 @@ description = "Add your description here"
|
|
| 5 |
readme = "README.md"
|
| 6 |
requires-python = ">=3.13"
|
| 7 |
dependencies = [
|
|
|
|
| 8 |
"email-validator==2.1.0",
|
| 9 |
"fastapi==0.109.2",
|
| 10 |
"pydantic>=2.8",
|
|
|
|
| 5 |
readme = "README.md"
|
| 6 |
requires-python = ">=3.13"
|
| 7 |
dependencies = [
|
| 8 |
+
"apscheduler>=3.11.2",
|
| 9 |
"email-validator==2.1.0",
|
| 10 |
"fastapi==0.109.2",
|
| 11 |
"pydantic>=2.8",
|
requirements.txt
CHANGED
|
@@ -7,6 +7,7 @@
|
|
| 7 |
fastapi==0.109.2
|
| 8 |
uvicorn[standard]==0.27.1
|
| 9 |
python-multipart==0.0.9
|
|
|
|
| 10 |
|
| 11 |
# Validation & Settings
|
| 12 |
pydantic>=2.8
|
|
@@ -22,10 +23,10 @@ supabase==2.3.4
|
|
| 22 |
python-dateutil==2.8.2
|
| 23 |
|
| 24 |
# Email (MVP — à activer pour les rappels)
|
| 25 |
-
|
| 26 |
|
| 27 |
# Scheduler (MVP — à activer pour les rappels automatiques)
|
| 28 |
-
|
| 29 |
|
| 30 |
# Dev & Test
|
| 31 |
pytest>=7.0,<9
|
|
|
|
| 7 |
fastapi==0.109.2
|
| 8 |
uvicorn[standard]==0.27.1
|
| 9 |
python-multipart==0.0.9
|
| 10 |
+
gunicorn==21.2.0
|
| 11 |
|
| 12 |
# Validation & Settings
|
| 13 |
pydantic>=2.8
|
|
|
|
| 23 |
python-dateutil==2.8.2
|
| 24 |
|
| 25 |
# Email (MVP — à activer pour les rappels)
|
| 26 |
+
resend==0.7.2
|
| 27 |
|
| 28 |
# Scheduler (MVP — à activer pour les rappels automatiques)
|
| 29 |
+
apscheduler==3.10.4
|
| 30 |
|
| 31 |
# Dev & Test
|
| 32 |
pytest>=7.0,<9
|
uv.lock
CHANGED
|
@@ -23,6 +23,18 @@ wheels = [
|
|
| 23 |
{ url = "https://files.pythonhosted.org/packages/38/0e/27be9fdef66e72d64c0cdc3cc2823101b80585f8119b5c112c2e8f5f7dab/anyio-4.12.1-py3-none-any.whl", hash = "sha256:d405828884fc140aa80a3c667b8beed277f1dfedec42ba031bd6ac3db606ab6c", size = 113592, upload-time = "2026-01-06T11:45:19.497Z" },
|
| 24 |
]
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
[[package]]
|
| 27 |
name = "certifi"
|
| 28 |
version = "2026.1.4"
|
|
@@ -99,6 +111,7 @@ name = "dedalys-backend"
|
|
| 99 |
version = "1.0.0"
|
| 100 |
source = { virtual = "." }
|
| 101 |
dependencies = [
|
|
|
|
| 102 |
{ name = "email-validator" },
|
| 103 |
{ name = "fastapi" },
|
| 104 |
{ name = "pydantic" },
|
|
@@ -116,6 +129,7 @@ dependencies = [
|
|
| 116 |
|
| 117 |
[package.metadata]
|
| 118 |
requires-dist = [
|
|
|
|
| 119 |
{ name = "email-validator", specifier = "==2.1.0" },
|
| 120 |
{ name = "fastapi", specifier = "==0.109.2" },
|
| 121 |
{ name = "pydantic", specifier = ">=2.8" },
|
|
@@ -658,6 +672,27 @@ wheels = [
|
|
| 658 |
{ url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" },
|
| 659 |
]
|
| 660 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 661 |
[[package]]
|
| 662 |
name = "urllib3"
|
| 663 |
version = "2.6.3"
|
|
|
|
| 23 |
{ url = "https://files.pythonhosted.org/packages/38/0e/27be9fdef66e72d64c0cdc3cc2823101b80585f8119b5c112c2e8f5f7dab/anyio-4.12.1-py3-none-any.whl", hash = "sha256:d405828884fc140aa80a3c667b8beed277f1dfedec42ba031bd6ac3db606ab6c", size = 113592, upload-time = "2026-01-06T11:45:19.497Z" },
|
| 24 |
]
|
| 25 |
|
| 26 |
+
[[package]]
|
| 27 |
+
name = "apscheduler"
|
| 28 |
+
version = "3.11.2"
|
| 29 |
+
source = { registry = "https://pypi.org/simple" }
|
| 30 |
+
dependencies = [
|
| 31 |
+
{ name = "tzlocal" },
|
| 32 |
+
]
|
| 33 |
+
sdist = { url = "https://files.pythonhosted.org/packages/07/12/3e4389e5920b4c1763390c6d371162f3784f86f85cd6d6c1bfe68eef14e2/apscheduler-3.11.2.tar.gz", hash = "sha256:2a9966b052ec805f020c8c4c3ae6e6a06e24b1bf19f2e11d91d8cca0473eef41", size = 108683, upload-time = "2025-12-22T00:39:34.884Z" }
|
| 34 |
+
wheels = [
|
| 35 |
+
{ url = "https://files.pythonhosted.org/packages/9f/64/2e54428beba8d9992aa478bb8f6de9e4ecaa5f8f513bcfd567ed7fb0262d/apscheduler-3.11.2-py3-none-any.whl", hash = "sha256:ce005177f741409db4e4dd40a7431b76feb856b9dd69d57e0da49d6715bfd26d", size = 64439, upload-time = "2025-12-22T00:39:33.303Z" },
|
| 36 |
+
]
|
| 37 |
+
|
| 38 |
[[package]]
|
| 39 |
name = "certifi"
|
| 40 |
version = "2026.1.4"
|
|
|
|
| 111 |
version = "1.0.0"
|
| 112 |
source = { virtual = "." }
|
| 113 |
dependencies = [
|
| 114 |
+
{ name = "apscheduler" },
|
| 115 |
{ name = "email-validator" },
|
| 116 |
{ name = "fastapi" },
|
| 117 |
{ name = "pydantic" },
|
|
|
|
| 129 |
|
| 130 |
[package.metadata]
|
| 131 |
requires-dist = [
|
| 132 |
+
{ name = "apscheduler", specifier = ">=3.11.2" },
|
| 133 |
{ name = "email-validator", specifier = "==2.1.0" },
|
| 134 |
{ name = "fastapi", specifier = "==0.109.2" },
|
| 135 |
{ name = "pydantic", specifier = ">=2.8" },
|
|
|
|
| 672 |
{ url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" },
|
| 673 |
]
|
| 674 |
|
| 675 |
+
[[package]]
|
| 676 |
+
name = "tzdata"
|
| 677 |
+
version = "2025.3"
|
| 678 |
+
source = { registry = "https://pypi.org/simple" }
|
| 679 |
+
sdist = { url = "https://files.pythonhosted.org/packages/5e/a7/c202b344c5ca7daf398f3b8a477eeb205cf3b6f32e7ec3a6bac0629ca975/tzdata-2025.3.tar.gz", hash = "sha256:de39c2ca5dc7b0344f2eba86f49d614019d29f060fc4ebc8a417896a620b56a7", size = 196772, upload-time = "2025-12-13T17:45:35.667Z" }
|
| 680 |
+
wheels = [
|
| 681 |
+
{ url = "https://files.pythonhosted.org/packages/c7/b0/003792df09decd6849a5e39c28b513c06e84436a54440380862b5aeff25d/tzdata-2025.3-py2.py3-none-any.whl", hash = "sha256:06a47e5700f3081aab02b2e513160914ff0694bce9947d6b76ebd6bf57cfc5d1", size = 348521, upload-time = "2025-12-13T17:45:33.889Z" },
|
| 682 |
+
]
|
| 683 |
+
|
| 684 |
+
[[package]]
|
| 685 |
+
name = "tzlocal"
|
| 686 |
+
version = "5.3.1"
|
| 687 |
+
source = { registry = "https://pypi.org/simple" }
|
| 688 |
+
dependencies = [
|
| 689 |
+
{ name = "tzdata", marker = "sys_platform == 'win32'" },
|
| 690 |
+
]
|
| 691 |
+
sdist = { url = "https://files.pythonhosted.org/packages/8b/2e/c14812d3d4d9cd1773c6be938f89e5735a1f11a9f184ac3639b93cef35d5/tzlocal-5.3.1.tar.gz", hash = "sha256:cceffc7edecefea1f595541dbd6e990cb1ea3d19bf01b2809f362a03dd7921fd", size = 30761, upload-time = "2025-03-05T21:17:41.549Z" }
|
| 692 |
+
wheels = [
|
| 693 |
+
{ url = "https://files.pythonhosted.org/packages/c2/14/e2a54fabd4f08cd7af1c07030603c3356b74da07f7cc056e600436edfa17/tzlocal-5.3.1-py3-none-any.whl", hash = "sha256:eb1a66c3ef5847adf7a834f1be0800581b683b5608e74f86ecbcef8ab91bb85d", size = 18026, upload-time = "2025-03-05T21:17:39.857Z" },
|
| 694 |
+
]
|
| 695 |
+
|
| 696 |
[[package]]
|
| 697 |
name = "urllib3"
|
| 698 |
version = "2.6.3"
|