Set-OPS-Public/promo/formation/dev-00/slides/contrat-python.html
Daniel Allaire 385e3f24e1 formation : le module D0 et le glossaire du developpeur (289)
Le parcours developpeur parlait la langue de Set-OPS des D1. D0, « De zero a en
ligne », fait le parcours entier sur deux depots minimaux, sans jargon, et situe
Set-OPS face a Heroku, Docker, Vercel et un VPS. Son application FastAPI a ete
lancee telle que montree, avec les paquets de Debian 13. Le glossaire traduit
47 mots du parcours, avec leur equivalent courant.

Publie par le site web de l'Alliance v1.5.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 19:06:38 -05:00

43 lines
4.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<section id="contrat-python" data-transition="fade" style="background:#131B36;color:#EEF2F8;font-family:'IBM Plex Sans', Arial, sans-serif;padding:128px 128px 160px;display:flex;flex-direction:column;gap:36px">
<div style="display:flex;flex-direction:column;gap:16px">
<p style="font-size:24px;letter-spacing:3px;text-transform:uppercase;color:#4FE3C1;font-weight:600">Son contrat</p>
<h2 style="font-family:'Source Serif 4', Georgia, serif;font-size:68px;font-weight:400;line-height:1.1;color:#EEF2F8">Ce que le serveur doit savoir pour la lancer.</h2>
</div>
<div style="display:flex;gap:32px;align-items:stretch">
<div style="flex:1;display:flex;flex-direction:column;gap:4px;background:#0B1022;padding:30px 32px;border-radius:20px;border-top:6px solid #4FE3C1;font-family:'JetBrains Mono', 'Courier New', monospace;font-size:23px;line-height:1.45">
<p style="font-family:'IBM Plex Sans', Arial, sans-serif;font-size:24px;letter-spacing:2px;text-transform:uppercase;color:#4FE3C1;font-weight:600">setops-app.yml</p>
<p style="font-size:23px;color:#EEF2F8;white-space:pre">norme: 1</p>
<p style="font-size:23px;color:#EEF2F8;white-space:pre">execution: python</p>
<p style="font-size:23px;color:#EEF2F8;white-space:pre">version_runtime: &quot;3.13&quot;</p>
<p style="font-size:23px;color:#EEF2F8;white-space:pre">demarrer: python3 -m uvicorn app.main:app \</p>
<p style="font-size:23px;color:#EEF2F8;white-space:pre"> --host 127.0.0.1 --port {port}</p>
<p style="font-size:23px;color:#EEF2F8;white-space:pre">sante: /sante</p>
<p style="font-size:23px;color:#EEF2F8;white-space:pre">etat:</p>
<p style="font-size:23px;color:#EEF2F8;white-space:pre"> dossier: donnees</p>
<p style="font-size:23px;color:#EEF2F8;white-space:pre">secrets: [CLE_API]</p>
<p style="font-size:23px;color:#EEF2F8;white-space:pre">dependances: debian</p>
<p style="font-size:23px;color:#EEF2F8;white-space:pre">paquets: [python3-fastapi, python3-uvicorn]</p>
</div>
<div style="display:grid;grid-template-columns:repeat(2, 1fr);gap:28px;align-items:stretch">
<div style="display:flex;flex-direction:column;gap:12px;background:#0B1022;padding:30px 32px;border-radius:18px;border-top:6px solid #56C2FF">
<p style="font-size:24px;letter-spacing:2px;text-transform:uppercase;color:#56C2FF;font-weight:600"><span style="font-family:'JetBrains Mono', 'Courier New', monospace;font-size:0.88em;color:#4FE3C1">{port}</span></p>
<p style="font-size:24px;line-height:1.45;color:#BCC7DA">le serveur le remplace par le port de l’application</p>
</div>
<div style="display:flex;flex-direction:column;gap:12px;background:#0B1022;padding:30px 32px;border-radius:18px;border-top:6px solid #4FE3C1">
<p style="font-size:24px;letter-spacing:2px;text-transform:uppercase;color:#4FE3C1;font-weight:600"><span style="font-family:'JetBrains Mono', 'Courier New', monospace;font-size:0.88em;color:#4FE3C1">donnees</span></p>
<p style="font-size:24px;line-height:1.45;color:#BCC7DA">le seul dossier où elle écrit</p>
</div>
<div style="display:flex;flex-direction:column;gap:12px;background:#0B1022;padding:30px 32px;border-radius:18px;border-top:6px solid #A98BFF">
<p style="font-size:24px;letter-spacing:2px;text-transform:uppercase;color:#A98BFF;font-weight:600"><span style="font-family:'JetBrains Mono', 'Courier New', monospace;font-size:0.88em;color:#4FE3C1">CLE_API</span></p>
<p style="font-size:24px;line-height:1.45;color:#BCC7DA">le nom du secret ; jamais sa valeur</p>
</div>
<div style="display:flex;flex-direction:column;gap:12px;background:#0B1022;padding:30px 32px;border-radius:18px;border-top:6px solid #FFC37A">
<p style="font-size:24px;letter-spacing:2px;text-transform:uppercase;color:#FFC37A;font-weight:600"><span style="font-family:'JetBrains Mono', 'Courier New', monospace;font-size:0.88em;color:#4FE3C1">paquets</span></p>
<p style="font-size:24px;line-height:1.45;color:#BCC7DA">des paquets Debian 13, rien de PyPI</p>
</div>
</div>
</div>
<p style="position:absolute;left:128px;bottom:64px;width:1400px;font-size:24px;color:#8592AD">Set-OPS · Formation · Module D0 — De zéro à en ligne</p>
<p style="position:absolute;right:128px;bottom:64px;width:120px;text-align:right;font-size:24px;color:#8592AD">09</p>
<aside>Son contrat est un peu plus long, parce qu’il y a quelque chose à lancer. La version de Python est 3.13, celle de Debian 13. La commande de démarrage lance Uvicorn ; elle écoute sur 127.0.0.1, et le motif {port} est remplacé par le serveur. Le chemin de santé. Le dossier d’état, donnees. Le nom du secret, jamais sa valeur : le mainteneur la garde dans un coffre chiffré. Et les dépendances : deux paquets Debian, python3-fastapi et python3-uvicorn. Rien ne vient de PyPI. Le validateur répond CONTRAT VALIDE sur ce fichier, et signale qu’un secret est à poser.</aside>
</section>