- Sort Score
- Num 10 results
- Language All
Results 791 - 800 of 1,045 for DEF (0.01 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
fastapi/encoders.py
from ._compat import ( Url, is_pydantic_v1_model_instance, ) # Taken from Pydantic v1 as is def isoformat(o: Union[datetime.date, datetime.time]) -> str: return o.isoformat() # Adapted from Pydantic v1 # TODO: pv2 should this return strings instead? def decimal_encoder(dec_value: Decimal) -> Union[int, float]: """ Encodes a Decimal as int if there's no exponent, otherwise float
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 10.7K bytes - Click Count (0) -
scripts/playwright/separate_openapi_schemas/image05.py
import subprocess from playwright.sync_api import Playwright, sync_playwright # Run playwright codegen to generate the code below, copy paste the sections in run() def run(playwright: Playwright) -> None: browser = playwright.chromium.launch(headless=False) # Update the viewport manually context = browser.new_context(viewport={"width": 960, "height": 1080}) page = context.new_page() page.goto("http://localhost:8000/docs")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Sep 13 09:14:46 GMT 2024 - 984 bytes - Click Count (0) -
tests/test_tutorial/test_templates/test_tutorial001.py
import os import shutil from fastapi.testclient import TestClient def test_main(): if os.path.isdir("./static"): # pragma: nocover shutil.rmtree("./static") if os.path.isdir("./templates"): # pragma: nocover shutil.rmtree("./templates") shutil.copytree("./docs_src/templates/templates/", "./templates") shutil.copytree("./docs_src/templates/static/", "./static")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 915 bytes - Click Count (0) -
docs_src/body_nested_models/tutorial003_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 409 bytes - Click Count (0) -
tests/test_tutorial/test_custom_response/test_tutorial008.py
from pathlib import Path from fastapi.testclient import TestClient from docs_src.custom_response import tutorial008_py39 from docs_src.custom_response.tutorial008_py39 import app client = TestClient(app) def test_get(tmp_path: Path): file_path: Path = tmp_path / "large-video-file.mp4" tutorial008_py39.some_file_path = str(file_path) test_content = b"Fake video bytes" file_path.write_bytes(test_content)
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 502 bytes - Click Count (0) -
docs_src/response_directly/tutorial001_py310.py
from pydantic import BaseModel class Item(BaseModel): title: str timestamp: datetime description: str | None = None app = FastAPI() @app.put("/items/{id}") def update_item(id: str, item: Item): json_compatible_item_data = jsonable_encoder(item)
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 10 08:55:32 GMT 2025 - 474 bytes - Click Count (0) -
docs_src/path_params_numeric_validations/tutorial001_an_py39.py
from typing import Annotated, Union from fastapi import FastAPI, Path, Query app = FastAPI() @app.get("/items/{item_id}") async def read_items( item_id: Annotated[int, Path(title="The ID of the item to get")], q: Annotated[Union[str, None], Query(alias="item-query")] = None, ): results = {"item_id": item_id} if q: results.update({"q": q})
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 388 bytes - Click Count (0) -
src/main/java/jcifs/smb1/http/NtlmHttpURLConnection.java
} @Override public int getHeaderFieldInt(final String header, final int def) { try { handshake(); } catch (final IOException ex) {} return connection.getHeaderFieldInt(header, def); } @Override public long getHeaderFieldDate(final String header, final long def) { try { handshake(); } catch (final IOException ex) {}Created: Sat Dec 20 13:44:44 GMT 2025 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 22.1K bytes - Click Count (0) -
docs_src/query_param_models/tutorial001_an_py39.py
limit: int = Field(100, gt=0, le=100) offset: int = Field(0, ge=0) order_by: Literal["created_at", "updated_at"] = "created_at" tags: list[str] = [] @app.get("/items/") async def read_items(filter_query: Annotated[FilterParams, Query()]):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 443 bytes - Click Count (0) -
docs_src/query_param_models/tutorial002_py39.py
limit: int = Field(100, gt=0, le=100) offset: int = Field(0, ge=0) order_by: Literal["created_at", "updated_at"] = "created_at" tags: list[str] = [] @app.get("/items/") async def read_items(filter_query: FilterParams = Query()):Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 462 bytes - Click Count (0)