Search Options

Results per page
Sort
Preferred Languages
Advance

Results 241 - 250 of 593 for Bar (0.01 sec)

  1. docs_src/query_params_str_validations/tutorial006c_an_py39.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[Union[str, None], Query(min_length=3)] = ...):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 320 bytes
    - Viewed (0)
  2. docs_src/query_params_str_validations/tutorial003.py

    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        q: Union[str, None] = Query(default=None, min_length=3, max_length=50),
    ):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 329 bytes
    - Viewed (0)
  3. docs_src/query_params_str_validations/tutorial006c_an.py

    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[Union[str, None], Query(min_length=3)] = ...):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 349 bytes
    - Viewed (0)
  4. docs_src/query_params_str_validations/tutorial007_an_py310.py

    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        q: Annotated[str | None, Query(title="Query string", min_length=3)] = None,
    ):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Mar 26 16:56:53 UTC 2024
    - 337 bytes
    - Viewed (0)
  5. istioctl/pkg/workload/testdata/vmconfig-nil-proxy-metadata/workloadgroup.yaml

    kind: WorkloadGroup
    metadata:
      name: foo
      namespace: bar
    spec:
      metadata:
        annotations: {}
        labels: {}
      template:
        ports: {}
        serviceAccount: vm-serviceaccount
      probe:
        httpGet:
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Jun 15 15:02:17 UTC 2023
    - 215 bytes
    - Viewed (0)
  6. docs_src/dependencies/tutorial003_an_py310.py

    from typing import Annotated, Any
    
    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/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 655 bytes
    - Viewed (0)
  7. docs_src/query_params_str_validations/tutorial004_an_py39.py

    @app.get("/items/")
    async def read_items(
        q: Annotated[
            Union[str, None], Query(min_length=3, max_length=50, pattern="^fixedquery$")
        ] = None,
    ):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 381 bytes
    - Viewed (0)
  8. docs_src/query_params_str_validations/tutorial009_an.py

    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[Union[str, None], Query(alias="item-query")] = None):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
            results.update({"q": q})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 356 bytes
    - Viewed (0)
  9. docs_src/extra_models/tutorial005_py39.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/keyword-weights/", response_model=dict[str, float])
    async def read_keyword_weights():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 180 bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/query-params-str-validations.md

    ```
    
    ////
    
    โคด๏ธ, โฎ๏ธ ๐Ÿ“› ๐Ÿ’–:
    
    ```
    http://localhost:8000/items/?q=foo&q=bar
    ```
    
    ๐Ÿ‘† ๐Ÿ”œ ๐Ÿ“จ ๐Ÿ’— `q` *๐Ÿ”ข ๐Ÿ”ข'* ๐Ÿ’ฒ (`foo` & `bar`) ๐Ÿ `list` ๐Ÿ”˜ ๐Ÿ‘† *โžก ๐Ÿ› ๏ธ ๐Ÿ”ข*, *๐Ÿ”ข ๐Ÿ”ข* `q`.
    
    , ๐Ÿ“จ ๐Ÿ‘ˆ ๐Ÿ“› ๐Ÿ”œ:
    
    ```JSON
    {
      "q": [
        "foo",
        "bar"
      ]
    }
    ```
    
    /// tip
    
    ๐Ÿ“ฃ ๐Ÿ”ข ๐Ÿ”ข โฎ๏ธ ๐Ÿ†Ž `list`, ๐Ÿ’– ๐Ÿ–ผ ๐Ÿ”›, ๐Ÿ‘† ๐Ÿ’ช ๐ŸŽฏ โš™๏ธ `Query`, โช โšซ๏ธ ๐Ÿ”œ ๐Ÿ”ฌ ๐Ÿ“จ ๐Ÿ’ช.
    
    ///
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.7K bytes
    - Viewed (0)
Back to top