- Sort Score
- Num 10 results
- Language All
Results 231 - 240 of 1,681 for tone (0.02 seconds)
-
docs_src/dependencies/tutorial005_py310.py
from fastapi import Cookie, Depends, FastAPI app = FastAPI() def query_extractor(q: str | None = None): return q def query_or_cookie_extractor( q: str = Depends(query_extractor), last_query: str | None = Cookie(default=None) ): if not q: return last_query return q @app.get("/items/") async def read_query(query_or_default: str = Depends(query_or_cookie_extractor)):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 443 bytes - Click Count (0) -
scripts/people.py
] class Author(BaseModel): login: str avatarUrl: str | None = None url: str | None = None class CommentsNode(BaseModel): createdAt: datetime author: Author | None = None minimizedReason: LowerStr | None = None class Replies(BaseModel): totalCount: int nodes: list[CommentsNode]
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Mar 23 13:51:24 GMT 2026 - 15K bytes - Click Count (0) -
tests/test_request_params/test_body/test_list.py
"required": ["p"], "title": body_model_name, "type": "object", } @pytest.mark.parametrize("json", [None, {}]) @pytest.mark.parametrize( "path", ["/required-list-str", "/model-required-list-str"], ) def test_required_list_str_missing(path: str, json: dict | None): client = TestClient(app) response = client.post(path, json=json) assert response.status_code == 422
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 11.9K bytes - Click Count (0) -
docs_src/dependencies/tutorial005_an_py310.py
from typing import Annotated from fastapi import Cookie, Depends, FastAPI app = FastAPI() def query_extractor(q: str | None = None): return q def query_or_cookie_extractor( q: Annotated[str, Depends(query_extractor)], last_query: Annotated[str | None, Cookie()] = None, ): if not q: return last_query return q @app.get("/items/") async def read_query(
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Mar 26 16:56:53 GMT 2024 - 510 bytes - Click Count (0) -
docs_src/response_model/tutorial001_01_py310.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: list[str] = [] @app.post("/items/") async def create_item(item: Item) -> Item: return item @app.get("/items/") async def read_items() -> list[Item]: return [
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Jan 07 13:45:48 GMT 2023 - 469 bytes - Click Count (0) -
docs_src/schema_extra_example/tutorial001_py310.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None model_config = { "json_schema_extra": { "examples": [ { "name": "Foo", "description": "A very nice Item", "price": 35.4,
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jul 07 17:12:13 GMT 2023 - 646 bytes - Click Count (0) -
docs/ja/docs/advanced/advanced-python-types.md
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 15:24:30 GMT 2026 - 2.4K bytes - Click Count (0) -
docs_src/request_files/tutorial001_02_an_py310.py
app = FastAPI() @app.post("/files/") async def create_file(file: Annotated[bytes | None, File()] = None): if not file: return {"message": "No file sent"} else: return {"file_size": len(file)} @app.post("/uploadfile/") async def create_upload_file(file: UploadFile | None = None): if not file: return {"message": "No upload file sent"} else:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 505 bytes - Click Count (0) -
docs/uk/docs/advanced/advanced-python-types.md
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:43:14 GMT 2026 - 3.1K bytes - Click Count (0) -
internal/config/lambda/target/lazyinit.go
type lazyInit struct { done uint32 m sync.Mutex } func (l *lazyInit) Do(f func() error) error { if atomic.LoadUint32(&l.done) == 0 { return l.doSlow(f) } return nil } func (l *lazyInit) doSlow(f func() error) error { l.m.Lock() defer l.m.Unlock() if atomic.LoadUint32(&l.done) == 0 { if err := f(); err != nil { return err }Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Tue Mar 07 16:12:41 GMT 2023 - 1.3K bytes - Click Count (0)