From b8d072e50ff9180b4ffc82206df03f11384fe2ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Tue, 3 Dec 2024 21:30:16 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Update=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 67 ++++++++++++++++++++++--------------------------------- 1 file changed, 27 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 63a4f40..a003e88 100644 --- a/README.md +++ b/README.md @@ -32,46 +32,33 @@ To run your FastAPI app for development, you can use the `fastapi dev` command: ```console $ fastapi dev main.py -INFO Using path main.py -INFO Resolved absolute path /home/user/code/awesomeapp/main.py -INFO Searching for package file structure from directories with __init__.py files -INFO Importing from /home/user/code/awesomeapp - - ╭─ Python module file ─╮ - │ │ - │ 🐍 main.py │ - │ │ - ╰──────────────────────╯ - -INFO Importing module main -INFO Found importable FastAPI app - - ╭─ Importable FastAPI app ─╮ - │ │ - │ from main import app │ - │ │ - ╰──────────────────────────╯ - -INFO Using import string main:app - - ╭────────── FastAPI CLI - Development mode ───────────╮ - │ │ - │ Serving at: http://127.0.0.1:8000 │ - │ │ - │ API docs: http://127.0.0.1:8000/docs │ - │ │ - │ Running in development mode, for production use: │ - │ │ - │ fastapi run │ - │ │ - ╰─────────────────────────────────────────────────────╯ - -INFO: Will watch for changes in these directories: ['/home/user/code/awesomeapp'] -INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) -INFO: Started reloader process [56345] using WatchFiles -INFO: Started server process [56352] -INFO: Waiting for application startup. -INFO: Application startup complete. + + FastAPI Starting development server 🚀 + + Searching for package file structure from directories with __init__.py files + Importing from /home/user/code/fastapi-cli + + module 🐍 main.py + + code Importing the FastAPI app object from the module with the following code: + + from main import app + + app Using import string: main:app + + server Server started at http://127.0.0.1:8000 + server Documentation at http://127.0.0.1:8000/docs + + tip Running in development mode, for production use: fastapi run + + Logs: + + INFO Will watch for changes in these directories: ['/home/user/code/fastapi-cli'] + INFO Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) + INFO Started reloader process [4106097] using WatchFiles + INFO Started server process [4106120] + INFO Waiting for application startup. + INFO Application startup complete. ```