- Sort Score
- Num 10 results
- Language All
Results 341 - 350 of 1,102 for DEF (0.02 seconds)
-
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 Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Sep 16 17:21:48 GMT 2025 - 1.2K bytes - Click Count (0) -
docs_src/request_files/tutorial003_py310.py
from fastapi.responses import HTMLResponse app = FastAPI() @app.post("/files/") async def create_files( files: list[bytes] = File(description="Multiple files as bytes"), ): return {"file_sizes": [len(file) for file in files]} @app.post("/uploadfiles/") async def create_upload_files( files: list[UploadFile] = File(description="Multiple files as UploadFile"), ):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 888 bytes - Click Count (0) -
tests/test_openapi_examples.py
from fastapi.testclient import TestClient from inline_snapshot import snapshot from pydantic import BaseModel app = FastAPI() class Item(BaseModel): data: str @app.post("/examples/") def examples( item: Item = Body( examples=[ {"data": "Data in Body examples, example1"}, ], openapi_examples={ "Example One": {
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 16.4K bytes - Click Count (0) -
build-logic/binary-compatibility/src/main/groovy/gradlebuild/binarycompatibility/transforms/ExplodeZipAndFindJars.groovy
shortName = shortName.substring(shortName.lastIndexOf('/') + 1) } if (shortName.endsWith('.jar')) { def outputDir = shortName.startsWith('gradle-') ? gradleJars : dependencies def out = new File(outputDir, shortName) Files.copy(zin, out.toPath()) zin.closeEntry() } } } }
Created: Wed Apr 01 11:36:16 GMT 2026 - Last Modified: Thu Jul 08 13:44:59 GMT 2021 - 2.4K bytes - Click Count (0) -
docs_src/sub_applications/tutorial001_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 274 bytes - Click Count (0) -
docs_src/openapi_callbacks/tutorial001_py310.py
invoices_callback_router = APIRouter() @invoices_callback_router.post( "{$callback_url}/invoices/{$request.body.id}", response_model=InvoiceEventReceived ) def invoice_notification(body: InvoiceEvent): pass @app.post("/invoices/", callbacks=invoices_callback_router.routes) def create_invoice(invoice: Invoice, callback_url: HttpUrl | None = None): """ Create an invoice.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 1.3K bytes - Click Count (0) -
docs_src/custom_response/tutorial004_py310.py
from fastapi import FastAPI from fastapi.responses import HTMLResponse app = FastAPI() def generate_html_response(): html_content = """ <html> <head> <title>Some HTML in here</title> </head> <body> <h1>Look ma! HTML!</h1> </body> </html> """ return HTMLResponse(content=html_content, status_code=200)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 491 bytes - Click Count (0) -
docs_src/wsgi/tutorial001_py310.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 426 bytes - Click Count (0) -
build-logic/build-update-utils/src/test/groovy/gradlebuild/buildutils/tasks/PreparePatchReleaseTest.groovy
class PreparePatchReleaseTest extends Specification { def "patch version is correctly bumped"() { expect: ReleasedVersionsHelperKt.bumpPatchVersion(input) == expected where: input | expected "9.4.0" | "9.4.1" "9.4.1" | "9.4.2" "8.0.0" | "8.0.1" "1.2.3" | "1.2.4" } def "invalid version format is rejected"() { when:Created: Wed Apr 01 11:36:16 GMT 2026 - Last Modified: Mon Mar 23 14:47:12 GMT 2026 - 1.3K bytes - Click Count (0) -
docs_src/dependencies/tutorial002_py310.py
fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}] class CommonQueryParams: def __init__(self, q: str | None = None, skip: int = 0, limit: int = 100): self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons: CommonQueryParams = Depends(CommonQueryParams)): response = {} if commons.q:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 624 bytes - Click Count (0)