Search Options

Results per page
Sort
Preferred Languages
Advance

Results 231 - 240 of 510 for bar1 (0.07 sec)

  1. 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)
  2. 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)
  3. 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)
  4. docs_src/query_params_str_validations/tutorial012_py39.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: list[str] = Query(default=["foo", "bar"])):
        query_items = {"q": q}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 192 bytes
    - Viewed (0)
  5. docs_src/query_params_str_validations/tutorial004_an.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
    - 410 bytes
    - Viewed (0)
  6. tests/test_starlette_exception.py

        response = client.get("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"item": "The Foo Wrestlers"}
    
    
    def test_get_item_not_found():
        response = client.get("/items/bar")
        assert response.status_code == 404, response.text
        assert response.headers.get("x-error") == "Some custom header"
        assert response.json() == {"detail": "Item not found"}
    
    
    def test_get_starlette_item():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  7. docs_src/query_params/tutorial001.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    fake_items_db = [{"item_name": "Foo"}, {"item_name": "Bar"}, {"item_name": "Baz"}]
    
    
    @app.get("/items/")
    async def read_item(skip: int = 0, limit: int = 10):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 250 bytes
    - Viewed (0)
  8. src/main/webapp/WEB-INF/view/common/admin/header.jsp

    <nav class="main-header navbar navbar-expand navbar-dark navbar-secondary">
    	<ul class="navbar-nav">
    		<li class="nav-item">
    			<a class="nav-link" data-widget="pushmenu" href="#">
    				<em class="fas fa-bars">
    				<span class="sr-only"><la:message
    						key="labels.admin_toggle_navi" /></span>
    			</a>
    		</li>
    	</ul>
    	<ul class="navbar-nav ml-auto">
    		<c:if test="${eoled}">
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Sat Oct 24 03:00:28 UTC 2020
    - 2.3K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_extra_models/test_tutorial005.py

    client = TestClient(app)
    
    
    def test_get_items():
        response = client.get("/keyword-weights/")
        assert response.status_code == 200, response.text
        assert response.json() == {"foo": 2.3, "bar": 3.4}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  10. docs_src/query_params_str_validations/tutorial006.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: str = 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: Fri May 13 23:38:22 UTC 2022
    - 254 bytes
    - Viewed (0)
Back to top