- Sort Score
- Num 10 results
- Language All
Results 281 - 290 of 1,083 for str (0.14 seconds)
-
docs_src/dataclasses_/tutorial001_py310.py
from dataclasses import dataclass from fastapi import FastAPI @dataclass class Item: name: str price: float description: str | None = None tax: float | None = None app = FastAPI() @app.post("/items/") async def create_item(item: Item):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Dec 26 10:43:02 GMT 2025 - 275 bytes - Click Count (0) -
src/main/java/jcifs/smb1/dcerpc/DcerpcHandle.java
* Parses a DCERPC binding string into a DcerpcBinding object * @param str the binding string to parse * @return the parsed DcerpcBinding object * @throws DcerpcException if the binding string is malformed */ protected static DcerpcBinding parseBinding(final String str) throws DcerpcException { int state, mark, si; final char[] arr = str.toCharArray(); String proto = null, key = null;Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 16 01:32:48 GMT 2025 - 11.7K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/llm/RelevanceEvaluationResultTest.java
RelevanceEvaluationResult result = RelevanceEvaluationResult.withRelevantDocs(docIds, indexes); String str = result.toString(); assertNotNull(str); assertTrue(str.contains("RelevanceEvaluationResult")); assertTrue(str.contains("doc1")); assertTrue(str.contains("doc2")); } @Test public void test_noRelevantResults_toString() {
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Sun Mar 01 08:11:18 GMT 2026 - 7.7K bytes - Click Count (0) -
docs_src/bigger_applications/app_an_py310/routers/items.py
@router.get("/{item_id}") async def read_item(item_id: str): if item_id not in fake_items_db: raise HTTPException(status_code=404, detail="Item not found") return {"name": fake_items_db[item_id]["name"], "item_id": item_id} @router.put( "/{item_id}", tags=["custom"], responses={403: {"description": "Operation forbidden"}}, ) async def update_item(item_id: str): if item_id != "plumbus":
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 1011 bytes - Click Count (0) -
tests/test_custom_schema_fields.py
from typing import Annotated from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel, WithJsonSchema app = FastAPI() class Item(BaseModel): name: str description: Annotated[str | None, WithJsonSchema({"type": ["string", "null"]})] = ( None ) model_config = { "json_schema_extra": { "x-something-internal": {"level": 4}, } }
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 1.3K bytes - Click Count (0) -
src/main/java/jcifs/util/ServerResponseValidator.java
*/ private String sanitizeForLog(String str) { if (str == null) { return "null"; } // Truncate long strings if (str.length() > 100) { str = str.substring(0, 100) + "..."; } // Remove control characters return str.replaceAll("[\\x00-\\x1F\\x7F]", "?"); } /**Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Sat Aug 30 05:58:03 GMT 2025 - 16.6K bytes - Click Count (0) -
fastapi/.agents/skills/fastapi/references/dependencies.md
offset: int = 0 limit: int = 100 q: str | None = None def get_page(self) -> dict: # Simulate a page of data return { "offset": self.offset, "limit": self.limit, "q": self.q, "items": [], } def get_db_paginator( offset: int = 0, limit: int = 100, q: str | None = None ) -> DatabasePaginator:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 01 10:05:57 GMT 2026 - 3.2K bytes - Click Count (0) -
docs_src/dependencies/tutorial011_py310.py
from fastapi import Depends, FastAPI app = FastAPI() class FixedContentQueryChecker: def __init__(self, fixed_content: str): self.fixed_content = fixed_content def __call__(self, q: str = ""): if q: return self.fixed_content in q return False checker = FixedContentQueryChecker("bar") @app.get("/query-checker/")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 504 bytes - Click Count (0) -
docs_src/python_types/tutorial004_py310.py
def get_name_with_age(name: str, age: int): name_with_age = name + " is this old: " + str(age)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 124 bytes - Click Count (0) -
docs_src/body/tutorial002_py310.py
from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None app = FastAPI() @app.post("/items/") async def create_item(item: Item): item_dict = item.model_dump() if item.tax is not None: price_with_tax = item.price + item.tax item_dict.update({"price_with_tax": price_with_tax})
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 447 bytes - Click Count (0)