## 🚀 Démarrage rapide - API Diagramme PH ### Installation ```bash # Installer les dépendances pip install -r requirements.txt ``` ### Configuration ```bash # Copier le fichier d'exemple cp ../.env.example ../.env # Éditer .env si nécessaire (optionnel) ``` ### Lancement de l'API ```bash # Option 1 : Depuis le répertoire racine python -m app.main # Option 2 : Avec uvicorn directement uvicorn app.main:app --reload --port 8000 # Option 3 : En mode production (sans reload) uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4 ``` ### Test de l'API Une fois lancée, visitez : - **Documentation interactive** : http://localhost:8000/docs - **Documentation alternative** : http://localhost:8000/redoc - **Page d'accueil** : http://localhost:8000/ - **Health check** : http://localhost:8000/api/v1/health ### Test avec cURL ```bash # Test health curl http://localhost:8000/api/v1/health # Résultat attendu: # { # "status": "healthy", # "service": "Diagram PH API", # "version": "1.0.0", # "environment": "development" # } ``` ### Structure du projet ``` app/ ├── __init__.py ├── main.py # Point d'entrée FastAPI ├── config.py # Configuration ├── requirements.txt # Dépendances │ ├── api/ # Endpoints API │ └── v1/ │ └── endpoints/ │ ├── core/ # Logique métier ├── models/ # Modèles Pydantic ├── services/ # Services └── utils/ # Utilitaires ``` ### Prochaines étapes Voir TACHES_IMPLEMENTATION.md pour les tâches suivantes : - Phase 2 : Intégration bibliothèques .so - Phase 3 : Calculs thermodynamiques - Phase 4 : Génération diagrammes