Skip to content

Instantly share code, notes, and snippets.

@thibaultserti
Last active May 19, 2024 14:53
Show Gist options
  • Save thibaultserti/21456f4797100376f67443920e5d5145 to your computer and use it in GitHub Desktop.
Save thibaultserti/21456f4797100376f67443920e5d5145 to your computer and use it in GitHub Desktop.
FastAPI

Pour installer les dépendances :

pip install -r requirements.txt

Pour lancer l'API :

uvicorn main:app --reload

Vérification :

La documentation est disponible sur /docs

from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
return {"message": "Hello, World!"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment