Skip to content

Commit

Permalink
📝 Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Dec 3, 2024
1 parent 3aebbe0 commit b8d072e
Showing 1 changed file with 27 additions and 40 deletions.
67 changes: 27 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
```

</div>
Expand Down

0 comments on commit b8d072e

Please sign in to comment.