chrisaka commited on
Commit
c877044
·
1 Parent(s): c605dd5

Switches to maybe_single() and enables bulk user creation

Browse files

Replaces strict .single() queries with .maybe_single() across routes
to handle missing records more gracefully and prevent exceptions.

Updates user creation in space management to support bulk addition
of multiple users at once, including rollback logic for partial failures.
Also adds resend dependency for future email functionality.

app/core/__pycache__/auth.cpython-313.pyc CHANGED
Binary files a/app/core/__pycache__/auth.cpython-313.pyc and b/app/core/__pycache__/auth.cpython-313.pyc differ
 
app/core/auth.py CHANGED
@@ -52,7 +52,7 @@ async def get_current_user(
52
  supabase_admin.table("utilisateurs")
53
  .select("*")
54
  .eq("id", supabase_user.id)
55
- .single()
56
  .execute()
57
  )
58
 
 
52
  supabase_admin.table("utilisateurs")
53
  .select("*")
54
  .eq("id", supabase_user.id)
55
+ .maybe_single()
56
  .execute()
57
  )
58
 
app/routers/__pycache__/audiences.cpython-313.pyc CHANGED
Binary files a/app/routers/__pycache__/audiences.cpython-313.pyc and b/app/routers/__pycache__/audiences.cpython-313.pyc differ
 
app/routers/__pycache__/auth.cpython-313.pyc CHANGED
Binary files a/app/routers/__pycache__/auth.cpython-313.pyc and b/app/routers/__pycache__/auth.cpython-313.pyc differ
 
app/routers/__pycache__/clients.cpython-313.pyc CHANGED
Binary files a/app/routers/__pycache__/clients.cpython-313.pyc and b/app/routers/__pycache__/clients.cpython-313.pyc differ
 
app/routers/__pycache__/dossiers.cpython-313.pyc CHANGED
Binary files a/app/routers/__pycache__/dossiers.cpython-313.pyc and b/app/routers/__pycache__/dossiers.cpython-313.pyc differ
 
app/routers/__pycache__/espaces.cpython-313.pyc CHANGED
Binary files a/app/routers/__pycache__/espaces.cpython-313.pyc and b/app/routers/__pycache__/espaces.cpython-313.pyc differ
 
app/routers/__pycache__/fichiers.cpython-313.pyc CHANGED
Binary files a/app/routers/__pycache__/fichiers.cpython-313.pyc and b/app/routers/__pycache__/fichiers.cpython-313.pyc differ
 
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/__pycache__/paiements.cpython-313.pyc CHANGED
Binary files a/app/routers/__pycache__/paiements.cpython-313.pyc and b/app/routers/__pycache__/paiements.cpython-313.pyc differ
 
app/routers/__pycache__/utilisateurs.cpython-313.pyc CHANGED
Binary files a/app/routers/__pycache__/utilisateurs.cpython-313.pyc and b/app/routers/__pycache__/utilisateurs.cpython-313.pyc differ
 
app/routers/audiences.py CHANGED
@@ -48,7 +48,7 @@ async def create_audience(
48
  .eq("id", str(payload.dossier_id))
49
  .eq("espace_id", espace_user.espace_id)
50
  .eq("is_archived", False)
51
- .single()
52
  .execute()
53
  )
54
  if not dossier.data:
@@ -61,7 +61,7 @@ async def create_audience(
61
  .select("id")
62
  .eq("id", str(payload.avocat_assigne_id))
63
  .eq("espace_id", espace_user.espace_id)
64
- .single()
65
  .execute()
66
  )
67
  if not avocat.data:
@@ -212,7 +212,7 @@ async def get_audience(
212
  .eq("id", str(audience_id))
213
  .eq("espace_id", espace_user.espace_id)
214
  .eq("is_archived", False)
215
- .single()
216
  .execute()
217
  )
218
  if not response.data:
@@ -237,10 +237,12 @@ async def update_audience(
237
  supabase_admin.table("audiences")
238
  .select("juridiction")
239
  .eq("id", str(audience_id))
240
- .single()
241
  .execute()
242
  )
243
- if existing.data and not existing.data.get("juridiction"):
 
 
244
  raise HTTPException(
245
  status_code=400,
246
  detail="La juridiction est obligatoire pour une audience"
 
48
  .eq("id", str(payload.dossier_id))
49
  .eq("espace_id", espace_user.espace_id)
50
  .eq("is_archived", False)
51
+ .maybe_single()
52
  .execute()
53
  )
54
  if not dossier.data:
 
61
  .select("id")
62
  .eq("id", str(payload.avocat_assigne_id))
63
  .eq("espace_id", espace_user.espace_id)
64
+ .maybe_single()
65
  .execute()
66
  )
67
  if not avocat.data:
 
212
  .eq("id", str(audience_id))
213
  .eq("espace_id", espace_user.espace_id)
214
  .eq("is_archived", False)
215
+ .maybe_single()
216
  .execute()
217
  )
218
  if not response.data:
 
237
  supabase_admin.table("audiences")
238
  .select("juridiction")
239
  .eq("id", str(audience_id))
240
+ .maybe_single()
241
  .execute()
242
  )
243
+ if not existing or not existing.data:
244
+ raise HTTPException(status_code=404, detail="Audience introuvable")
245
+ if not existing.data.get("juridiction"):
246
  raise HTTPException(
247
  status_code=400,
248
  detail="La juridiction est obligatoire pour une audience"
app/routers/auth.py CHANGED
@@ -39,7 +39,7 @@ async def login(payload: LoginRequest):
39
  supabase_admin.table("utilisateurs")
40
  .select("*")
41
  .eq("id", auth_response.user.id)
42
- .single()
43
  .execute()
44
  )
45
  if not profile_response.data:
@@ -74,7 +74,7 @@ async def refresh_token(payload: RefreshRequest):
74
  supabase_admin.table("utilisateurs")
75
  .select("*")
76
  .eq("id", auth_response.user.id)
77
- .single()
78
  .execute()
79
  )
80
 
 
39
  supabase_admin.table("utilisateurs")
40
  .select("*")
41
  .eq("id", auth_response.user.id)
42
+ .maybe_single()
43
  .execute()
44
  )
45
  if not profile_response.data:
 
74
  supabase_admin.table("utilisateurs")
75
  .select("*")
76
  .eq("id", auth_response.user.id)
77
+ .maybe_single()
78
  .execute()
79
  )
80
 
app/routers/clients.py CHANGED
@@ -111,7 +111,7 @@ async def get_client(
111
  .eq("id", str(client_id))
112
  .eq("espace_id", espace_user.espace_id)
113
  .eq("is_archived", False)
114
- .single()
115
  .execute()
116
  )
117
  if not response.data:
@@ -185,7 +185,7 @@ async def vue_360(
185
  .eq("id", str(client_id))
186
  .eq("espace_id", espace_user.espace_id)
187
  .eq("is_archived", False)
188
- .single()
189
  .execute()
190
  )
191
  if not client.data:
@@ -253,7 +253,7 @@ async def create_contact(
253
  .eq("id", str(client_id))
254
  .eq("espace_id", espace_user.espace_id)
255
  .eq("is_archived", False)
256
- .single()
257
  .execute()
258
  )
259
  if not client_check.data:
 
111
  .eq("id", str(client_id))
112
  .eq("espace_id", espace_user.espace_id)
113
  .eq("is_archived", False)
114
+ .maybe_single()
115
  .execute()
116
  )
117
  if not response.data:
 
185
  .eq("id", str(client_id))
186
  .eq("espace_id", espace_user.espace_id)
187
  .eq("is_archived", False)
188
+ .maybe_single()
189
  .execute()
190
  )
191
  if not client.data:
 
253
  .eq("id", str(client_id))
254
  .eq("espace_id", espace_user.espace_id)
255
  .eq("is_archived", False)
256
+ .maybe_single()
257
  .execute()
258
  )
259
  if not client_check.data:
app/routers/dossiers.py CHANGED
@@ -65,7 +65,7 @@ async def create_dossier(
65
  .eq("id", str(payload.client_id))
66
  .eq("espace_id", espace_user.espace_id)
67
  .eq("is_archived", False)
68
- .single()
69
  .execute()
70
  )
71
  if not client_resp.data:
@@ -173,7 +173,7 @@ async def get_dossier(
173
  .eq("id", str(dossier_id))
174
  .eq("espace_id", espace_user.espace_id)
175
  .eq("is_archived", False)
176
- .single()
177
  .execute()
178
  )
179
  if not response.data:
@@ -248,7 +248,7 @@ async def recapitulatif_financier(
248
  .eq("id", str(dossier_id))
249
  .eq("espace_id", espace_user.espace_id)
250
  .eq("is_archived", False)
251
- .single()
252
  .execute()
253
  )
254
  if not dossier.data:
@@ -297,7 +297,7 @@ async def add_membre_equipe(
297
  .eq("id", str(dossier_id))
298
  .eq("espace_id", espace_user.espace_id)
299
  .eq("is_archived", False)
300
- .single()
301
  .execute()
302
  )
303
  if not dossier_check.data:
@@ -309,7 +309,7 @@ async def add_membre_equipe(
309
  .select("id")
310
  .eq("id", str(payload.utilisateur_id))
311
  .eq("espace_id", espace_user.espace_id)
312
- .single()
313
  .execute()
314
  )
315
  if not user_check.data:
 
65
  .eq("id", str(payload.client_id))
66
  .eq("espace_id", espace_user.espace_id)
67
  .eq("is_archived", False)
68
+ .maybe_single()
69
  .execute()
70
  )
71
  if not client_resp.data:
 
173
  .eq("id", str(dossier_id))
174
  .eq("espace_id", espace_user.espace_id)
175
  .eq("is_archived", False)
176
+ .maybe_single()
177
  .execute()
178
  )
179
  if not response.data:
 
248
  .eq("id", str(dossier_id))
249
  .eq("espace_id", espace_user.espace_id)
250
  .eq("is_archived", False)
251
+ .maybe_single()
252
  .execute()
253
  )
254
  if not dossier.data:
 
297
  .eq("id", str(dossier_id))
298
  .eq("espace_id", espace_user.espace_id)
299
  .eq("is_archived", False)
300
+ .maybe_single()
301
  .execute()
302
  )
303
  if not dossier_check.data:
 
309
  .select("id")
310
  .eq("id", str(payload.utilisateur_id))
311
  .eq("espace_id", espace_user.espace_id)
312
+ .maybe_single()
313
  .execute()
314
  )
315
  if not user_check.data:
app/routers/espaces.py CHANGED
@@ -60,7 +60,7 @@ async def get_espace(
60
  .select("*")
61
  .eq("id", str(espace_id))
62
  .eq("is_archived", False)
63
- .single()
64
  .execute()
65
  )
66
  if not espace_resp.data:
@@ -128,14 +128,14 @@ async def archive_espace(
128
  # GESTION DES UTILISATEURS DE L'ESPACE
129
  # ══════════════════════════════════════════════════════════════════════════════
130
 
131
- @router.post("/{espace_id}/utilisateurs", response_model=UtilisateurResponse, status_code=201)
132
- async def add_utilisateur(
133
  espace_id: UUID,
134
- payload: UtilisateurCreate,
135
  _: CurrentUser = Depends(require_superadmin),
136
  ):
137
  """
138
- Crée un utilisateur et l'ajoute à l'espace.
139
  Superadmin only — pas d'auto-inscription.
140
  """
141
  # Vérifier que l'espace existe
@@ -144,47 +144,71 @@ async def add_utilisateur(
144
  .select("id")
145
  .eq("id", str(espace_id))
146
  .eq("is_archived", False)
147
- .single()
148
  .execute()
149
  )
150
- if not espace_check.data:
151
  raise HTTPException(status_code=404, detail="Espace introuvable")
152
 
153
- # Créer l'utilisateur dans Supabase Auth
154
- try:
155
- auth_response = supabase_admin.auth.admin.create_user({
156
- "email": payload.email,
157
- "password": payload.password,
158
- "email_confirm": True,
159
- })
160
- except Exception as e:
161
- raise HTTPException(
162
- status_code=400, detail=f"Erreur création Auth: {str(e)}")
163
-
164
- if not auth_response.user:
165
- raise HTTPException(
166
- status_code=500, detail="Échec création utilisateur Auth")
167
-
168
- # Créer le profil dans la table utilisateurs
169
- profile_data = {
170
- "id": auth_response.user.id,
171
- "email": payload.email,
172
- "nom": payload.nom,
173
- "prenom": payload.prenom,
174
- "role_cabinet": payload.role_cabinet.value,
175
- "espace_id": str(espace_id),
176
- "is_superadmin": False,
177
- }
178
-
179
- profile_resp = supabase_admin.table(
180
- "utilisateurs").insert(profile_data).execute()
181
- if not profile_resp.data:
182
- # Rollback: supprimer l'utilisateur Auth créé
183
- supabase_admin.auth.admin.delete_user(auth_response.user.id)
184
- raise HTTPException(
185
- status_code=500, detail="Échec création profil utilisateur")
186
-
187
- return profile_resp.data[0]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
 
189
 
190
  @router.delete("/{espace_id}/utilisateurs/{utilisateur_id}", response_model=MessageResponse)
@@ -203,7 +227,7 @@ async def remove_utilisateur(
203
  .select("id")
204
  .eq("id", str(utilisateur_id))
205
  .eq("espace_id", str(espace_id))
206
- .single()
207
  .execute()
208
  )
209
  if not user_check.data:
 
60
  .select("*")
61
  .eq("id", str(espace_id))
62
  .eq("is_archived", False)
63
+ .maybe_single()
64
  .execute()
65
  )
66
  if not espace_resp.data:
 
128
  # GESTION DES UTILISATEURS DE L'ESPACE
129
  # ══════════════════════════════════════════════════════════════════════════════
130
 
131
+ @router.post("/{espace_id}/utilisateurs", response_model=List[UtilisateurResponse], status_code=201)
132
+ async def add_utilisateurs(
133
  espace_id: UUID,
134
+ payload: List[UtilisateurCreate],
135
  _: CurrentUser = Depends(require_superadmin),
136
  ):
137
  """
138
+ Crée plusieurs utilisateurs et les ajoute à l'espace.
139
  Superadmin only — pas d'auto-inscription.
140
  """
141
  # Vérifier que l'espace existe
 
144
  .select("id")
145
  .eq("id", str(espace_id))
146
  .eq("is_archived", False)
147
+ .maybe_single()
148
  .execute()
149
  )
150
+ if not espace_check or not espace_check.data:
151
  raise HTTPException(status_code=404, detail="Espace introuvable")
152
 
153
+ created_users = []
154
+ created_auth_ids = [] # pour rollback global si besoin
155
+
156
+ for user_data in payload:
157
+ # Créer l'utilisateur dans Supabase Auth
158
+ try:
159
+ auth_response = supabase_admin.auth.admin.create_user({
160
+ "email": user_data.email,
161
+ "password": user_data.password,
162
+ "email_confirm": True,
163
+ })
164
+ except Exception as e:
165
+ # Rollback tous les utilisateurs déjà créés
166
+ for auth_id in created_auth_ids:
167
+ try:
168
+ supabase_admin.auth.admin.delete_user(auth_id)
169
+ except Exception:
170
+ pass
171
+ raise HTTPException(
172
+ status_code=400,
173
+ detail=f"Erreur création Auth pour {user_data.email}: {str(e)}"
174
+ )
175
+
176
+ if not auth_response.user:
177
+ for auth_id in created_auth_ids:
178
+ try:
179
+ supabase_admin.auth.admin.delete_user(auth_id)
180
+ except Exception:
181
+ pass
182
+ raise HTTPException(
183
+ status_code=500, detail="Échec création utilisateur Auth")
184
+
185
+ created_auth_ids.append(auth_response.user.id)
186
+
187
+ # Créer le profil
188
+ profile_data = {
189
+ "id": auth_response.user.id,
190
+ "email": user_data.email,
191
+ "nom": user_data.nom,
192
+ "prenom": user_data.prenom,
193
+ "role_cabinet": user_data.role_cabinet.value,
194
+ "espace_id": str(espace_id),
195
+ "is_superadmin": False,
196
+ }
197
+
198
+ profile_resp = supabase_admin.table(
199
+ "utilisateurs").insert(profile_data).execute()
200
+ if not profile_resp.data:
201
+ for auth_id in created_auth_ids:
202
+ try:
203
+ supabase_admin.auth.admin.delete_user(auth_id)
204
+ except Exception:
205
+ pass
206
+ raise HTTPException(
207
+ status_code=500, detail=f"Échec création profil pour {user_data.email}")
208
+
209
+ created_users.append(profile_resp.data[0])
210
+
211
+ return created_users
212
 
213
 
214
  @router.delete("/{espace_id}/utilisateurs/{utilisateur_id}", response_model=MessageResponse)
 
227
  .select("id")
228
  .eq("id", str(utilisateur_id))
229
  .eq("espace_id", str(espace_id))
230
+ .maybe_single()
231
  .execute()
232
  )
233
  if not user_check.data:
app/routers/fichiers.py CHANGED
@@ -97,7 +97,7 @@ async def upload_fichier(
97
  .eq("id", str(dossier_id))
98
  .eq("espace_id", espace_user.espace_id)
99
  .eq("is_archived", False)
100
- .single()
101
  .execute()
102
  )
103
  if not dossier_resp.data:
@@ -208,7 +208,7 @@ async def get_fichier(
208
  .eq("id", str(fichier_id))
209
  .eq("espace_id", espace_user.espace_id)
210
  .eq("is_archived", False)
211
- .single()
212
  .execute()
213
  )
214
  if not response.data:
 
97
  .eq("id", str(dossier_id))
98
  .eq("espace_id", espace_user.espace_id)
99
  .eq("is_archived", False)
100
+ .maybe_single()
101
  .execute()
102
  )
103
  if not dossier_resp.data:
 
208
  .eq("id", str(fichier_id))
209
  .eq("espace_id", espace_user.espace_id)
210
  .eq("is_archived", False)
211
+ .maybe_single()
212
  .execute()
213
  )
214
  if not response.data:
app/routers/flash_cr.py CHANGED
@@ -50,7 +50,7 @@ async def create_flash_cr(
50
  .eq("id", str(payload.audience_id))
51
  .eq("espace_id", espace_user.espace_id)
52
  .eq("is_archived", False)
53
- .single()
54
  .execute()
55
  )
56
  if not audience.data:
@@ -145,7 +145,7 @@ async def get_flash_cr_by_audience(
145
  .eq("audience_id", str(audience_id))
146
  .eq("espace_id", espace_user.espace_id)
147
  .eq("is_archived", False)
148
- .single()
149
  .execute()
150
  )
151
  if not response.data:
@@ -198,7 +198,7 @@ async def get_flash_cr(
198
  .eq("id", str(flash_cr_id))
199
  .eq("espace_id", espace_user.espace_id)
200
  .eq("is_archived", False)
201
- .single()
202
  .execute()
203
  )
204
  if not response.data:
@@ -224,10 +224,13 @@ async def update_flash_cr(
224
  supabase_admin.table("flash_cr")
225
  .select("prochaine_date")
226
  .eq("id", str(flash_cr_id))
227
- .single()
228
  .execute()
229
  )
230
- if existing.data and not existing.data.get("prochaine_date"):
 
 
 
231
  raise HTTPException(
232
  status_code=400,
233
  detail=f"La prochaine date est obligatoire pour type_decision='{data['type_decision']}'"
 
50
  .eq("id", str(payload.audience_id))
51
  .eq("espace_id", espace_user.espace_id)
52
  .eq("is_archived", False)
53
+ .maybe_single()
54
  .execute()
55
  )
56
  if not audience.data:
 
145
  .eq("audience_id", str(audience_id))
146
  .eq("espace_id", espace_user.espace_id)
147
  .eq("is_archived", False)
148
+ .maybe_single()
149
  .execute()
150
  )
151
  if not response.data:
 
198
  .eq("id", str(flash_cr_id))
199
  .eq("espace_id", espace_user.espace_id)
200
  .eq("is_archived", False)
201
+ .maybe_single()
202
  .execute()
203
  )
204
  if not response.data:
 
224
  supabase_admin.table("flash_cr")
225
  .select("prochaine_date")
226
  .eq("id", str(flash_cr_id))
227
+ .maybe_single()
228
  .execute()
229
  )
230
+ if not existing or not existing.data:
231
+ raise HTTPException(
232
+ status_code=404, detail="Flash CR introuvable")
233
+ if not existing.data.get("prochaine_date"):
234
  raise HTTPException(
235
  status_code=400,
236
  detail=f"La prochaine date est obligatoire pour type_decision='{data['type_decision']}'"
app/routers/paiements.py CHANGED
@@ -37,7 +37,7 @@ async def create_paiement(
37
  .eq("id", str(payload.client_id))
38
  .eq("espace_id", espace_user.espace_id)
39
  .eq("is_archived", False)
40
- .single()
41
  .execute()
42
  )
43
  if not client_check.data:
@@ -52,7 +52,7 @@ async def create_paiement(
52
  .eq("client_id", str(payload.client_id))
53
  .eq("espace_id", espace_user.espace_id)
54
  .eq("is_archived", False)
55
- .single()
56
  .execute()
57
  )
58
  if not dossier_check.data:
@@ -171,7 +171,7 @@ async def get_paiement(
171
  .eq("id", str(paiement_id))
172
  .eq("espace_id", espace_user.espace_id)
173
  .eq("is_archived", False)
174
- .single()
175
  .execute()
176
  )
177
  if not response.data:
 
37
  .eq("id", str(payload.client_id))
38
  .eq("espace_id", espace_user.espace_id)
39
  .eq("is_archived", False)
40
+ .maybe_single()
41
  .execute()
42
  )
43
  if not client_check.data:
 
52
  .eq("client_id", str(payload.client_id))
53
  .eq("espace_id", espace_user.espace_id)
54
  .eq("is_archived", False)
55
+ .maybe_single()
56
  .execute()
57
  )
58
  if not dossier_check.data:
 
171
  .eq("id", str(paiement_id))
172
  .eq("espace_id", espace_user.espace_id)
173
  .eq("is_archived", False)
174
+ .maybe_single()
175
  .execute()
176
  )
177
  if not response.data:
app/routers/utilisateurs.py CHANGED
@@ -26,7 +26,7 @@ async def get_my_profile(
26
  supabase_admin.table("utilisateurs")
27
  .select("*")
28
  .eq("id", current_user.id)
29
- .single()
30
  .execute()
31
  )
32
  if not response.data:
@@ -87,7 +87,7 @@ async def get_utilisateur(
87
  .select("*")
88
  .eq("id", str(utilisateur_id))
89
  .eq("espace_id", current_user.espace_id)
90
- .single()
91
  .execute()
92
  )
93
  if not response.data:
@@ -111,7 +111,7 @@ async def update_role_cabinet(
111
  .select("id")
112
  .eq("id", str(utilisateur_id))
113
  .eq("espace_id", current_user.espace_id)
114
- .single()
115
  .execute()
116
  )
117
  if not user_check.data:
 
26
  supabase_admin.table("utilisateurs")
27
  .select("*")
28
  .eq("id", current_user.id)
29
+ .maybe_single()
30
  .execute()
31
  )
32
  if not response.data:
 
87
  .select("*")
88
  .eq("id", str(utilisateur_id))
89
  .eq("espace_id", current_user.espace_id)
90
+ .maybe_single()
91
  .execute()
92
  )
93
  if not response.data:
 
111
  .select("id")
112
  .eq("id", str(utilisateur_id))
113
  .eq("espace_id", current_user.espace_id)
114
+ .maybe_single()
115
  .execute()
116
  )
117
  if not user_check.data:
pyproject.toml CHANGED
@@ -15,6 +15,7 @@ dependencies = [
15
  "python-dateutil==2.8.2",
16
  "python-dotenv==1.0.1",
17
  "python-multipart==0.0.9",
 
18
  "supabase==2.3.4",
19
  "uvicorn[standard]==0.27.1",
20
  ]
 
15
  "python-dateutil==2.8.2",
16
  "python-dotenv==1.0.1",
17
  "python-multipart==0.0.9",
18
+ "resend>=2.23.0",
19
  "supabase==2.3.4",
20
  "uvicorn[standard]==0.27.1",
21
  ]
uv.lock CHANGED
@@ -32,6 +32,47 @@ wheels = [
32
  { url = "https://files.pythonhosted.org/packages/e6/ad/3cc14f097111b4de0040c83a525973216457bbeeb63739ef1ed275c1c021/certifi-2026.1.4-py3-none-any.whl", hash = "sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c", size = 152900, upload-time = "2026-01-04T02:42:40.15Z" },
33
  ]
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  [[package]]
36
  name = "click"
37
  version = "8.3.1"
@@ -68,6 +109,7 @@ dependencies = [
68
  { name = "python-dateutil" },
69
  { name = "python-dotenv" },
70
  { name = "python-multipart" },
 
71
  { name = "supabase" },
72
  { name = "uvicorn", extra = ["standard"] },
73
  ]
@@ -84,6 +126,7 @@ requires-dist = [
84
  { name = "python-dateutil", specifier = "==2.8.2" },
85
  { name = "python-dotenv", specifier = "==1.0.1" },
86
  { name = "python-multipart", specifier = "==0.0.9" },
 
87
  { name = "supabase", specifier = "==2.3.4" },
88
  { name = "uvicorn", extras = ["standard"], specifier = "==0.27.1" },
89
  ]
@@ -484,6 +527,34 @@ wheels = [
484
  { url = "https://files.pythonhosted.org/packages/4c/d8/412c4ae92743484f500520828309b7e98dba9f258f5b1d18e51f54af54ff/realtime-1.0.6-py3-none-any.whl", hash = "sha256:c66918a106d8ef348d1821f2dbf6683d8833825580d95b2fdea9995406b42838", size = 8967, upload-time = "2024-06-15T22:39:03.939Z" },
485
  ]
486
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
487
  [[package]]
488
  name = "six"
489
  version = "1.17.0"
@@ -587,6 +658,15 @@ wheels = [
587
  { 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" },
588
  ]
589
 
 
 
 
 
 
 
 
 
 
590
  [[package]]
591
  name = "uvicorn"
592
  version = "0.27.1"
 
32
  { url = "https://files.pythonhosted.org/packages/e6/ad/3cc14f097111b4de0040c83a525973216457bbeeb63739ef1ed275c1c021/certifi-2026.1.4-py3-none-any.whl", hash = "sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c", size = 152900, upload-time = "2026-01-04T02:42:40.15Z" },
33
  ]
34
 
35
+ [[package]]
36
+ name = "charset-normalizer"
37
+ version = "3.4.4"
38
+ source = { registry = "https://pypi.org/simple" }
39
+ sdist = { url = "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz", hash = "sha256:94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a", size = 129418, upload-time = "2025-10-14T04:42:32.879Z" }
40
+ wheels = [
41
+ { url = "https://files.pythonhosted.org/packages/97/45/4b3a1239bbacd321068ea6e7ac28875b03ab8bc0aa0966452db17cd36714/charset_normalizer-3.4.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:e1f185f86a6f3403aa2420e815904c67b2f9ebc443f045edd0de921108345794", size = 208091, upload-time = "2025-10-14T04:41:13.346Z" },
42
+ { url = "https://files.pythonhosted.org/packages/7d/62/73a6d7450829655a35bb88a88fca7d736f9882a27eacdca2c6d505b57e2e/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b39f987ae8ccdf0d2642338faf2abb1862340facc796048b604ef14919e55ed", size = 147936, upload-time = "2025-10-14T04:41:14.461Z" },
43
+ { url = "https://files.pythonhosted.org/packages/89/c5/adb8c8b3d6625bef6d88b251bbb0d95f8205831b987631ab0c8bb5d937c2/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3162d5d8ce1bb98dd51af660f2121c55d0fa541b46dff7bb9b9f86ea1d87de72", size = 144180, upload-time = "2025-10-14T04:41:15.588Z" },
44
+ { url = "https://files.pythonhosted.org/packages/91/ed/9706e4070682d1cc219050b6048bfd293ccf67b3d4f5a4f39207453d4b99/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:81d5eb2a312700f4ecaa977a8235b634ce853200e828fbadf3a9c50bab278328", size = 161346, upload-time = "2025-10-14T04:41:16.738Z" },
45
+ { url = "https://files.pythonhosted.org/packages/d5/0d/031f0d95e4972901a2f6f09ef055751805ff541511dc1252ba3ca1f80cf5/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5bd2293095d766545ec1a8f612559f6b40abc0eb18bb2f5d1171872d34036ede", size = 158874, upload-time = "2025-10-14T04:41:17.923Z" },
46
+ { url = "https://files.pythonhosted.org/packages/f5/83/6ab5883f57c9c801ce5e5677242328aa45592be8a00644310a008d04f922/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a8a8b89589086a25749f471e6a900d3f662d1d3b6e2e59dcecf787b1cc3a1894", size = 153076, upload-time = "2025-10-14T04:41:19.106Z" },
47
+ { url = "https://files.pythonhosted.org/packages/75/1e/5ff781ddf5260e387d6419959ee89ef13878229732732ee73cdae01800f2/charset_normalizer-3.4.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc7637e2f80d8530ee4a78e878bce464f70087ce73cf7c1caf142416923b98f1", size = 150601, upload-time = "2025-10-14T04:41:20.245Z" },
48
+ { url = "https://files.pythonhosted.org/packages/d7/57/71be810965493d3510a6ca79b90c19e48696fb1ff964da319334b12677f0/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f8bf04158c6b607d747e93949aa60618b61312fe647a6369f88ce2ff16043490", size = 150376, upload-time = "2025-10-14T04:41:21.398Z" },
49
+ { url = "https://files.pythonhosted.org/packages/e5/d5/c3d057a78c181d007014feb7e9f2e65905a6c4ef182c0ddf0de2924edd65/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:554af85e960429cf30784dd47447d5125aaa3b99a6f0683589dbd27e2f45da44", size = 144825, upload-time = "2025-10-14T04:41:22.583Z" },
50
+ { url = "https://files.pythonhosted.org/packages/e6/8c/d0406294828d4976f275ffbe66f00266c4b3136b7506941d87c00cab5272/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:74018750915ee7ad843a774364e13a3db91682f26142baddf775342c3f5b1133", size = 162583, upload-time = "2025-10-14T04:41:23.754Z" },
51
+ { url = "https://files.pythonhosted.org/packages/d7/24/e2aa1f18c8f15c4c0e932d9287b8609dd30ad56dbe41d926bd846e22fb8d/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:c0463276121fdee9c49b98908b3a89c39be45d86d1dbaa22957e38f6321d4ce3", size = 150366, upload-time = "2025-10-14T04:41:25.27Z" },
52
+ { url = "https://files.pythonhosted.org/packages/e4/5b/1e6160c7739aad1e2df054300cc618b06bf784a7a164b0f238360721ab86/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:362d61fd13843997c1c446760ef36f240cf81d3ebf74ac62652aebaf7838561e", size = 160300, upload-time = "2025-10-14T04:41:26.725Z" },
53
+ { url = "https://files.pythonhosted.org/packages/7a/10/f882167cd207fbdd743e55534d5d9620e095089d176d55cb22d5322f2afd/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a26f18905b8dd5d685d6d07b0cdf98a79f3c7a918906af7cc143ea2e164c8bc", size = 154465, upload-time = "2025-10-14T04:41:28.322Z" },
54
+ { url = "https://files.pythonhosted.org/packages/89/66/c7a9e1b7429be72123441bfdbaf2bc13faab3f90b933f664db506dea5915/charset_normalizer-3.4.4-cp313-cp313-win32.whl", hash = "sha256:9b35f4c90079ff2e2edc5b26c0c77925e5d2d255c42c74fdb70fb49b172726ac", size = 99404, upload-time = "2025-10-14T04:41:29.95Z" },
55
+ { url = "https://files.pythonhosted.org/packages/c4/26/b9924fa27db384bdcd97ab83b4f0a8058d96ad9626ead570674d5e737d90/charset_normalizer-3.4.4-cp313-cp313-win_amd64.whl", hash = "sha256:b435cba5f4f750aa6c0a0d92c541fb79f69a387c91e61f1795227e4ed9cece14", size = 107092, upload-time = "2025-10-14T04:41:31.188Z" },
56
+ { url = "https://files.pythonhosted.org/packages/af/8f/3ed4bfa0c0c72a7ca17f0380cd9e4dd842b09f664e780c13cff1dcf2ef1b/charset_normalizer-3.4.4-cp313-cp313-win_arm64.whl", hash = "sha256:542d2cee80be6f80247095cc36c418f7bddd14f4a6de45af91dfad36d817bba2", size = 100408, upload-time = "2025-10-14T04:41:32.624Z" },
57
+ { url = "https://files.pythonhosted.org/packages/2a/35/7051599bd493e62411d6ede36fd5af83a38f37c4767b92884df7301db25d/charset_normalizer-3.4.4-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:da3326d9e65ef63a817ecbcc0df6e94463713b754fe293eaa03da99befb9a5bd", size = 207746, upload-time = "2025-10-14T04:41:33.773Z" },
58
+ { url = "https://files.pythonhosted.org/packages/10/9a/97c8d48ef10d6cd4fcead2415523221624bf58bcf68a802721a6bc807c8f/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8af65f14dc14a79b924524b1e7fffe304517b2bff5a58bf64f30b98bbc5079eb", size = 147889, upload-time = "2025-10-14T04:41:34.897Z" },
59
+ { url = "https://files.pythonhosted.org/packages/10/bf/979224a919a1b606c82bd2c5fa49b5c6d5727aa47b4312bb27b1734f53cd/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74664978bb272435107de04e36db5a9735e78232b85b77d45cfb38f758efd33e", size = 143641, upload-time = "2025-10-14T04:41:36.116Z" },
60
+ { url = "https://files.pythonhosted.org/packages/ba/33/0ad65587441fc730dc7bd90e9716b30b4702dc7b617e6ba4997dc8651495/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:752944c7ffbfdd10c074dc58ec2d5a8a4cd9493b314d367c14d24c17684ddd14", size = 160779, upload-time = "2025-10-14T04:41:37.229Z" },
61
+ { url = "https://files.pythonhosted.org/packages/67/ed/331d6b249259ee71ddea93f6f2f0a56cfebd46938bde6fcc6f7b9a3d0e09/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1f13550535ad8cff21b8d757a3257963e951d96e20ec82ab44bc64aeb62a191", size = 159035, upload-time = "2025-10-14T04:41:38.368Z" },
62
+ { url = "https://files.pythonhosted.org/packages/67/ff/f6b948ca32e4f2a4576aa129d8bed61f2e0543bf9f5f2b7fc3758ed005c9/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ecaae4149d99b1c9e7b88bb03e3221956f68fd6d50be2ef061b2381b61d20838", size = 152542, upload-time = "2025-10-14T04:41:39.862Z" },
63
+ { url = "https://files.pythonhosted.org/packages/16/85/276033dcbcc369eb176594de22728541a925b2632f9716428c851b149e83/charset_normalizer-3.4.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cb6254dc36b47a990e59e1068afacdcd02958bdcce30bb50cc1700a8b9d624a6", size = 149524, upload-time = "2025-10-14T04:41:41.319Z" },
64
+ { url = "https://files.pythonhosted.org/packages/9e/f2/6a2a1f722b6aba37050e626530a46a68f74e63683947a8acff92569f979a/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c8ae8a0f02f57a6e61203a31428fa1d677cbe50c93622b4149d5c0f319c1d19e", size = 150395, upload-time = "2025-10-14T04:41:42.539Z" },
65
+ { url = "https://files.pythonhosted.org/packages/60/bb/2186cb2f2bbaea6338cad15ce23a67f9b0672929744381e28b0592676824/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:47cc91b2f4dd2833fddaedd2893006b0106129d4b94fdb6af1f4ce5a9965577c", size = 143680, upload-time = "2025-10-14T04:41:43.661Z" },
66
+ { url = "https://files.pythonhosted.org/packages/7d/a5/bf6f13b772fbb2a90360eb620d52ed8f796f3c5caee8398c3b2eb7b1c60d/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:82004af6c302b5d3ab2cfc4cc5f29db16123b1a8417f2e25f9066f91d4411090", size = 162045, upload-time = "2025-10-14T04:41:44.821Z" },
67
+ { url = "https://files.pythonhosted.org/packages/df/c5/d1be898bf0dc3ef9030c3825e5d3b83f2c528d207d246cbabe245966808d/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b7d8f6c26245217bd2ad053761201e9f9680f8ce52f0fcd8d0755aeae5b2152", size = 149687, upload-time = "2025-10-14T04:41:46.442Z" },
68
+ { url = "https://files.pythonhosted.org/packages/a5/42/90c1f7b9341eef50c8a1cb3f098ac43b0508413f33affd762855f67a410e/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:799a7a5e4fb2d5898c60b640fd4981d6a25f1c11790935a44ce38c54e985f828", size = 160014, upload-time = "2025-10-14T04:41:47.631Z" },
69
+ { url = "https://files.pythonhosted.org/packages/76/be/4d3ee471e8145d12795ab655ece37baed0929462a86e72372fd25859047c/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:99ae2cffebb06e6c22bdc25801d7b30f503cc87dbd283479e7b606f70aff57ec", size = 154044, upload-time = "2025-10-14T04:41:48.81Z" },
70
+ { url = "https://files.pythonhosted.org/packages/b0/6f/8f7af07237c34a1defe7defc565a9bc1807762f672c0fde711a4b22bf9c0/charset_normalizer-3.4.4-cp314-cp314-win32.whl", hash = "sha256:f9d332f8c2a2fcbffe1378594431458ddbef721c1769d78e2cbc06280d8155f9", size = 99940, upload-time = "2025-10-14T04:41:49.946Z" },
71
+ { url = "https://files.pythonhosted.org/packages/4b/51/8ade005e5ca5b0d80fb4aff72a3775b325bdc3d27408c8113811a7cbe640/charset_normalizer-3.4.4-cp314-cp314-win_amd64.whl", hash = "sha256:8a6562c3700cce886c5be75ade4a5db4214fda19fede41d9792d100288d8f94c", size = 107104, upload-time = "2025-10-14T04:41:51.051Z" },
72
+ { url = "https://files.pythonhosted.org/packages/da/5f/6b8f83a55bb8278772c5ae54a577f3099025f9ade59d0136ac24a0df4bde/charset_normalizer-3.4.4-cp314-cp314-win_arm64.whl", hash = "sha256:de00632ca48df9daf77a2c65a484531649261ec9f25489917f09e455cb09ddb2", size = 100743, upload-time = "2025-10-14T04:41:52.122Z" },
73
+ { url = "https://files.pythonhosted.org/packages/0a/4c/925909008ed5a988ccbb72dcc897407e5d6d3bd72410d69e051fc0c14647/charset_normalizer-3.4.4-py3-none-any.whl", hash = "sha256:7a32c560861a02ff789ad905a2fe94e3f840803362c84fecf1851cb4cf3dc37f", size = 53402, upload-time = "2025-10-14T04:42:31.76Z" },
74
+ ]
75
+
76
  [[package]]
77
  name = "click"
78
  version = "8.3.1"
 
109
  { name = "python-dateutil" },
110
  { name = "python-dotenv" },
111
  { name = "python-multipart" },
112
+ { name = "resend" },
113
  { name = "supabase" },
114
  { name = "uvicorn", extra = ["standard"] },
115
  ]
 
126
  { name = "python-dateutil", specifier = "==2.8.2" },
127
  { name = "python-dotenv", specifier = "==1.0.1" },
128
  { name = "python-multipart", specifier = "==0.0.9" },
129
+ { name = "resend", specifier = ">=2.23.0" },
130
  { name = "supabase", specifier = "==2.3.4" },
131
  { name = "uvicorn", extras = ["standard"], specifier = "==0.27.1" },
132
  ]
 
527
  { url = "https://files.pythonhosted.org/packages/4c/d8/412c4ae92743484f500520828309b7e98dba9f258f5b1d18e51f54af54ff/realtime-1.0.6-py3-none-any.whl", hash = "sha256:c66918a106d8ef348d1821f2dbf6683d8833825580d95b2fdea9995406b42838", size = 8967, upload-time = "2024-06-15T22:39:03.939Z" },
528
  ]
529
 
530
+ [[package]]
531
+ name = "requests"
532
+ version = "2.32.5"
533
+ source = { registry = "https://pypi.org/simple" }
534
+ dependencies = [
535
+ { name = "certifi" },
536
+ { name = "charset-normalizer" },
537
+ { name = "idna" },
538
+ { name = "urllib3" },
539
+ ]
540
+ sdist = { url = "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf", size = 134517, upload-time = "2025-08-18T20:46:02.573Z" }
541
+ wheels = [
542
+ { url = "https://files.pythonhosted.org/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6", size = 64738, upload-time = "2025-08-18T20:46:00.542Z" },
543
+ ]
544
+
545
+ [[package]]
546
+ name = "resend"
547
+ version = "2.23.0"
548
+ source = { registry = "https://pypi.org/simple" }
549
+ dependencies = [
550
+ { name = "requests" },
551
+ { name = "typing-extensions" },
552
+ ]
553
+ sdist = { url = "https://files.pythonhosted.org/packages/96/a3/20003e7d14604fef778bd30c69604df3560a657a95a5c29a9688610759b6/resend-2.23.0.tar.gz", hash = "sha256:df613827dcc40eb1c9de2e5ff600cd4081b89b206537dec8067af1a5016d23c7", size = 31416, upload-time = "2026-02-23T19:01:57.603Z" }
554
+ wheels = [
555
+ { url = "https://files.pythonhosted.org/packages/e3/35/64df775b8cd95e89798fd7b1b7fcafa975b6b09f559c10c0650e65b33580/resend-2.23.0-py2.py3-none-any.whl", hash = "sha256:eca6d28a1ffd36c1fc489fa83cb6b511f384792c9f07465f7c92d96c8b4d5636", size = 52599, upload-time = "2026-02-23T19:01:55.962Z" },
556
+ ]
557
+
558
  [[package]]
559
  name = "six"
560
  version = "1.17.0"
 
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"
664
+ source = { registry = "https://pypi.org/simple" }
665
+ sdist = { url = "https://files.pythonhosted.org/packages/c7/24/5f1b3bdffd70275f6661c76461e25f024d5a38a46f04aaca912426a2b1d3/urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed", size = 435556, upload-time = "2026-01-07T16:24:43.925Z" }
666
+ wheels = [
667
+ { url = "https://files.pythonhosted.org/packages/39/08/aaaad47bc4e9dc8c725e68f9d04865dbcb2052843ff09c97b08904852d84/urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4", size = 131584, upload-time = "2026-01-07T16:24:42.685Z" },
668
+ ]
669
+
670
  [[package]]
671
  name = "uvicorn"
672
  version = "0.27.1"