- Sort Score
- Num 10 results
- Language All
Results 511 - 520 of 1,045 for DEF (0.01 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
tests/test_tutorial/test_additional_status_codes/test_tutorial001.py
"tutorial001_an_py39", pytest.param("tutorial001_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.additional_status_codes.{request.param}") client = TestClient(mod.app) return client def test_update(client: TestClient): response = client.put("/items/foo", json={"name": "Wrestlers"})
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 993 bytes - Click Count (0) -
tests/test_tutorial/test_extra_models/test_tutorial003.py
pytest.param("tutorial003_py39"), pytest.param("tutorial003_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.extra_models.{request.param}") client = TestClient(mod.app) return client def test_get_car(client: TestClient): response = client.get("/items/item1") assert response.status_code == 200, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 6K bytes - Click Count (0) -
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/logging/SystemLogger.java
this.threshold = Objects.requireNonNullElse(threshold, Level.INFO); } private PrintStream toPsOrDef(OutputStream outputStream, PrintStream def) { if (outputStream == null) { return def; } if (outputStream instanceof PrintStream ps) { return ps; } return new PrintStream(outputStream, true); } @Override
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Sat Feb 08 16:25:25 GMT 2025 - 2.4K bytes - Click Count (0) -
docs/tr/docs/index.md
app = FastAPI() @app.get("/") def read_root(): return {"Hello": "World"} @app.get("/items/{item_id}") def read_item(item_id: int, q: Union[str, None] = None): return {"item_id": item_id, "q": q} ``` <details markdown="1"> <summary>Ya da <code>async def</code>...</summary> Eğer kodunuzda `async` / `await` varsa, `async def` kullanalım: ```Python hl_lines="9 14"
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Oct 11 17:48:49 GMT 2025 - 21.9K bytes - Click Count (0) -
fastapi/exception_handlers.py
{"detail": exc.detail}, status_code=exc.status_code, headers=headers ) async def request_validation_exception_handler( request: Request, exc: RequestValidationError ) -> JSONResponse: return JSONResponse( status_code=422, content={"detail": jsonable_encoder(exc.errors())}, ) async def websocket_request_validation_exception_handler(Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 16 17:21:48 GMT 2025 - 1.2K bytes - Click Count (0) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial002b.py
client = TestClient(app) def test_get_items(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == ["Portal gun", "Plumbus"] def test_get_users(): response = client.get("/users/") assert response.status_code == 200, response.text assert response.json() == ["Rick", "Morty"] def test_openapi_schema():
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.7K bytes - Click Count (0) -
docs/ru/docs/tutorial/background-tasks.md
Это обычная функция, которая может принимать параметры. Это может быть как `async def`, так и обычная функция `def`, **FastAPI** знает, как корректно её выполнить. В этом случае функция задачи будет записывать данные в файл (имитируя отправку письма). Так как операция записи не использует `async` и `await`, мы определим функцию как обычную `def`: {* ../../docs_src/background_tasks/tutorial001_py39.py hl[6:9] *}Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 7.6K bytes - Click Count (0) -
tests/test_tutorial/test_body_updates/test_tutorial001.py
params=[ "tutorial001_py39", pytest.param("tutorial001_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.body_updates.{request.param}") client = TestClient(mod.app) return client def test_get(client: TestClient): response = client.get("/items/baz") assert response.status_code == 200, response.textCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 6.6K bytes - Click Count (0) -
tests/test_get_model_definitions_formfeed_escape.py
app = FastAPI() @app.get("/facilities/{facility_id}") def get_facility(facility_id: str) -> Facility: return Facility( id=facility_id, address=Address(line_1="123 Main St", city="Anytown", state_province="CA"), ) client = TestClient(app) return client def test_get(client: TestClient): response = client.get("/facilities/42")Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 5.8K bytes - Click Count (0) -
tests/test_tutorial/test_extra_models/test_tutorial004.py
@pytest.fixture( name="client", params=[ pytest.param("tutorial004_py39"), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.extra_models.{request.param}") client = TestClient(mod.app) return client def test_get_items(client: TestClient): response = client.get("/items/") assert response.status_code == 200, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 2.2K bytes - Click Count (0)