Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 301 - 310 of 831 for fOo (0.03 seconds)

  1. docs_src/query_params_str_validations/tutorial010_py310.py

            min_length=3,
            max_length=50,
            pattern="^fixedquery$",
            deprecated=True,
        ),
    ):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 542 bytes
    - Click Count (0)
  2. docs_src/events/tutorial001_py310.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    items = {}
    
    
    @app.on_event("startup")
    async def startup_event():
        items["foo"] = {"name": "Fighters"}
        items["bar"] = {"name": "Tenders"}
    
    
    @app.get("/items/{item_id}")
    async def read_items(item_id: str):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 283 bytes
    - Click Count (0)
  3. docs_src/query_params_str_validations/tutorial006_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[str, Query(min_length=3)]):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 294 bytes
    - Click Count (0)
  4. docs_src/query_params_str_validations/tutorial007_py310.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        q: str | None = Query(default=None, title="Query string", min_length=3),
    ):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 304 bytes
    - Click Count (0)
  5. docs_src/query_params_str_validations/tutorial002_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[str | None, Query(max_length=50)] = None):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 309 bytes
    - Click Count (0)
  6. guava-testlib/test/com/google/common/testing/TestLogHandlerTest.java

        // stored log records causes a ConcurrentModificationException
        assertTrue(handler.getStoredLogRecords().isEmpty());
        ExampleClassUnderTest.foo();
        ExampleClassUnderTest.foo();
        for (LogRecord unused : handler.getStoredLogRecords()) {
          ExampleClassUnderTest.foo();
        }
      }
    
      @Override
      public final void runBare() throws Throwable {
        try {
          setUp();
          runTest();
        } finally {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 17 16:11:48 GMT 2026
    - 2.9K bytes
    - Click Count (0)
  7. docs_src/dependencies/tutorial006_py310.py

            raise HTTPException(status_code=400, detail="X-Key header invalid")
        return x_key
    
    
    @app.get("/items/", dependencies=[Depends(verify_token), Depends(verify_key)])
    async def read_items():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 583 bytes
    - Click Count (0)
  8. docs/zh-hant/docs/tutorial/header-params.md

    例如,要宣告可以出現多次的 `X-Token` 標頭,可以這樣寫:
    
    {* ../../docs_src/header_params/tutorial003_an_py310.py hl[9] *}
    
    如果你在與該*路徑操作 (path operation)* 溝通時送出兩個 HTTP 標頭如下:
    
    ```
    X-Token: foo
    X-Token: bar
    ```
    
    回應會像這樣:
    
    ```JSON
    {
        "X-Token values": [
            "bar",
            "foo"
        ]
    }
    ```
    
    ## 小結 { #recap }
    
    使用 `Header` 宣告標頭,套用與 `Query`、`Path`、`Cookie` 相同的通用模式。
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:15:26 GMT 2026
    - 2.7K bytes
    - Click Count (0)
  9. docs_src/extra_models/tutorial004_py310.py

    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: str
    
    
    items = [
        {"name": "Foo", "description": "There comes my hero"},
        {"name": "Red", "description": "It's my aeroplane"},
    ]
    
    
    @app.get("/items/", response_model=list[Item])
    async def read_items():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 356 bytes
    - Click Count (0)
  10. docs_src/dependencies/tutorial002_an_py310.py

    from typing import Annotated
    
    from fastapi import Depends, FastAPI
    
    app = FastAPI()
    
    
    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/")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 664 bytes
    - Click Count (0)
Back to Top