- Sort Score
- Result 10 results
- Languages All
Results 381 - 390 of 805 for fdef (0.02 sec)
-
docs_src/handling_errors/tutorial006_py39.py
app = FastAPI() @app.exception_handler(StarletteHTTPException) async def custom_http_exception_handler(request, exc): print(f"OMG! An HTTP error!: {repr(exc)}") return await http_exception_handler(request, exc) @app.exception_handler(RequestValidationError) async def validation_exception_handler(request, exc): print(f"OMG! The client sent invalid data!: {exc}")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 928 bytes - Viewed (0) -
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"})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 993 bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt
Request( url = server.url("/"), body = "def".toRequestBody("text/plain".toMediaType()), ) executeSynchronously(request) .assertCode(200) .assertBody("abc") val recordedRequest = server.takeRequest() assertThat(recordedRequest.method).isEqualTo("POST") assertThat(recordedRequest.body?.utf8()).isEqualTo("def") assertThat(recordedRequest.headers["Content-Length"]).isEqualTo("3")
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 19:13:52 UTC 2025 - 147.4K bytes - Viewed (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
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 6K bytes - Viewed (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(Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Sep 16 17:21:48 UTC 2025 - 1.2K bytes - Viewed (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():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.7K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/index.md
You can use `async def` or normal `def`. And you can declare dependencies with `async def` inside of normal `def` *path operation functions*, or `def` dependencies inside of `async def` *path operation functions*, etc. It doesn't matter. **FastAPI** will know what to do. /// note
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 9.6K bytes - Viewed (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
Registered: Sun Dec 28 03:35:09 UTC 2025 - Last Modified: Sat Feb 08 16:25:25 UTC 2025 - 2.4K bytes - Viewed (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"
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 21.9K bytes - Viewed (0) -
build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/AcceptedApiChanges.groovy
GradleVersion baseVersion Map<ApiChange, String> acceptedChanges static AcceptedApiChanges parse(List<String> jsonTexts) { def acceptedApiChanges = new AcceptedApiChanges() acceptedApiChanges.acceptedChanges = [:] for (String jsonText : jsonTexts) { def json = new Gson().fromJson(jsonText, new TypeToken<Map<String, List<AcceptedApiChange>>>() {}.type)Registered: Wed Dec 31 11:36:14 UTC 2025 - Last Modified: Tue Jun 04 14:00:46 UTC 2024 - 1.9K bytes - Viewed (0)