- Sort Score
- Result 10 results
- Languages All
Results 211 - 220 of 226 for uvicorn (0.07 sec)
-
docs/em/docs/help-fastapi.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 11.7K bytes - Viewed (0) -
docs/pt/docs/advanced/settings.md
<div class="termy"> ```console $ ADMIN_EMAIL="******@****.***" APP_NAME="ChimichangApp" fastapi run main.py <span style="color: green;">INFO</span>: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) ``` </div> /// dica
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 17K bytes - Viewed (0) -
docs/de/docs/help-fastapi.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 16K bytes - Viewed (0) -
docs/en/docs/release-notes.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Nov 01 11:25:57 UTC 2024 - 460.3K bytes - Viewed (0) -
tests/test_tutorial/test_handling_errors/test_tutorial003.py
from docs_src.handling_errors.tutorial003 import app client = TestClient(app) def test_get(): response = client.get("/unicorns/shinny") assert response.status_code == 200, response.text assert response.json() == {"unicorn_name": "shinny"} def test_get_exception(): response = client.get("/unicorns/yolo") assert response.status_code == 418, response.text assert response.json() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.2K bytes - Viewed (0) -
docs_src/handling_errors/tutorial003.py
return JSONResponse( status_code=418, content={"message": f"Oops! {exc.name} did something. There goes a rainbow..."}, ) @app.get("/unicorns/{name}") async def read_unicorn(name: str): if name == "yolo": raise UnicornException(name=name)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Mar 26 19:09:53 UTC 2020 - 626 bytes - Viewed (0) -
docs/em/docs/tutorial/handling-errors.md
& 👆 💚 🍵 👉 ⚠ 🌐 ⏮️ FastAPI. 👆 💪 🚮 🛃 ⚠ 🐕🦺 ⏮️ `@app.exception_handler()`: ```Python hl_lines="5-7 13-18 24" {!../../docs_src/handling_errors/tutorial003.py!} ``` 📥, 🚥 👆 📨 `/unicorns/yolo`, *➡ 🛠️* 🔜 `raise` `UnicornException`. ✋️ ⚫️ 🔜 🍵 `unicorn_exception_handler`. , 👆 🔜 📨 🧹 ❌, ⏮️ 🇺🇸🔍 👔 📟 `418` & 🎻 🎚: ```JSON
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.3K bytes - Viewed (0) -
docs/ru/docs/tutorial/handling-errors.md
Можно добавить собственный обработчик исключений с помощью `@app.exception_handler()`: ```Python hl_lines="5-7 13-18 24" {!../../docs_src/handling_errors/tutorial003.py!} ``` Здесь, если запросить `/unicorns/yolo`, то *операция пути* вызовет `UnicornException`. Но оно будет обработано `unicorn_exception_handler`. Таким образом, вы получите чистую ошибку с кодом состояния HTTP `418` и содержимым JSON: ```JSON
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 14.5K bytes - Viewed (0) -
docs/pt/docs/tutorial/handling-errors.md
```Python hl_lines="5-7 13-18 24" {!../../docs_src/handling_errors/tutorial003.py!} ``` Nesse cenário, se você fizer uma requisição para `/unicorns/yolo`, a *operação de caminho* vai lançar (`raise`) o `UnicornException`. Essa exceção será manipulada, contudo, pelo `unicorn_exception_handler`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10K bytes - Viewed (0) -
docs/en/docs/tutorial/handling-errors.md
You could add a custom exception handler with `@app.exception_handler()`: ```Python hl_lines="5-7 13-18 24" {!../../docs_src/handling_errors/tutorial003.py!} ``` Here, if you request `/unicorns/yolo`, the *path operation* will `raise` a `UnicornException`. But it will be handled by the `unicorn_exception_handler`. So, you will receive a clean error, with an HTTP status code of `418` and a JSON content of:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.1K bytes - Viewed (0)