- Sort Score
- Num 10 results
- Language All
Results 811 - 820 of 3,612 for fromP2 (0.05 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
tests/test_tutorial/test_handling_errors/test_tutorial003.py
from fastapi.testclient import TestClient from docs_src.handling_errors.tutorial003_py39 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
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 3.2K bytes - Click Count (0) -
internal/deadlineconn/deadlineconn_test.go
deadlineconn.WithWriteDeadline(time.Second) defer deadlineconn.Close() // Read a line b := make([]byte, 12) _, terr = deadlineconn.Read(b) if terr != nil { t.Errorf("failed to read from client. %v", terr) return } received := string(b) if received != "message one\n" { t.Errorf(`server: expected: "message one\n", got: %v`, received) return }
Created: Sun Dec 28 19:28:13 GMT 2025 - Last Modified: Mon Nov 11 17:15:17 GMT 2024 - 4.8K bytes - Click Count (0) -
docs/changelogs/changelog_2x.md
## Version 2.0.0 This release commits to a stable 2.0 API. Read the 2.0.0-RC1 changes for advice on upgrading from 1.x to 2.x. _2014-06-21_ * **API Change**: Use `IOException` in `Callback.onFailure()`. This is a source-incompatible change, and is different from OkHttp 2.0.0-RC2 which used `Throwable`. * Fix: Fixed a caching bug where we weren't storing rewritten request headers
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 26.6K bytes - Click Count (0) -
docs_src/advanced_middleware/tutorial001_py39.py
from fastapi import FastAPI from fastapi.middleware.httpsredirect import HTTPSRedirectMiddleware app = FastAPI() app.add_middleware(HTTPSRedirectMiddleware) @app.get("/") async def main():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 231 bytes - Click Count (0) -
docs_src/custom_response/tutorial006b_py39.py
from fastapi import FastAPI from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/fastapi", response_class=RedirectResponse) async def redirect_fastapi():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 220 bytes - Click Count (0) -
docs_src/query_params_str_validations/tutorial006c_an_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Feb 15 16:23:59 GMT 2025 - 314 bytes - Click Count (0) -
tests/test_tutorial/test_response_model/test_tutorial003_04.py
import importlib import pytest from fastapi.exceptions import FastAPIError from ...utils import needs_py310 @pytest.mark.parametrize( "module_name", [ pytest.param("tutorial003_04_py39"), pytest.param("tutorial003_04_py310", marks=needs_py310), ], ) def test_invalid_response_model(module_name: str) -> None: with pytest.raises(FastAPIError):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 453 bytes - Click Count (0) -
docs_src/custom_response/tutorial006c_py39.py
from fastapi import FastAPI from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/pydantic", response_class=RedirectResponse, status_code=302) async def redirect_pydantic():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 237 bytes - Click Count (0) -
docs_src/response_model/tutorial003_05_py310.py
from fastapi import FastAPI, Response from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/portal", response_model=None) async def get_portal(teleport: bool = False) -> Response | dict: if teleport: return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Jan 10 16:22:47 GMT 2023 - 373 bytes - Click Count (0) -
docs_src/extra_models/tutorial004_py39.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str items = [ {"name": "Foo", "description": "There comes my hero"}, {"name": "Red", "description": "It's my aeroplane"}, ] @app.get("/items/", response_model=list[Item]) async def read_items():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 356 bytes - Click Count (0)