Search Options

Results per page
Sort
Preferred Languages
Advance

Results 621 - 630 of 1,721 for item (0.09 sec)

  1. docs_src/path_params_numeric_validations/tutorial005_an.py

    from fastapi import FastAPI, Path
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        item_id: Annotated[int, Path(title="The ID of the item to get", gt=0, le=1000)],
        q: str,
    ):
        results = {"item_id": item_id}
        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
    - 341 bytes
    - Viewed (0)
  2. scripts/playwright/separate_openapi_schemas/image05.py

        # Update the viewport manually
        context = browser.new_context(viewport={"width": 960, "height": 1080})
        page = context.new_page()
        page.goto("http://localhost:8000/docs")
        page.get_by_role("button", name="Item", exact=True).click()
        page.set_viewport_size({"width": 960, "height": 700})
        # Manually add the screenshot
        page.screenshot(
            path="docs/en/docs/img/tutorial/separate-openapi-schemas/image05.png"
        )
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 13 09:14:46 UTC 2024
    - 984 bytes
    - Viewed (0)
  3. docs_src/query_params_str_validations/tutorial010_an_py39.py

    from typing import Annotated, Union
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        q: Annotated[
            Union[str, None],
            Query(
                alias="item-query",
                title="Query string",
                description="Query string for the items to search in the database that have a good match",
                min_length=3,
                max_length=50,
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 24 20:26:06 UTC 2023
    - 635 bytes
    - Viewed (0)
  4. src/main/webapp/WEB-INF/view/admin/badword/admin_badword_upload.jsp

                            <ol class="breadcrumb float-sm-right">
                                <li class="breadcrumb-item active"><la:link href="/admin/badword">
                                    <la:message key="labels.bad_word_link_list"/>
                                </la:link></li>
                                <li class="breadcrumb-item active"><la:message
                                        key="labels.bad_word_link_upload"/></li>
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 13 07:47:04 UTC 2020
    - 5.4K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_dependencies/test_tutorial008b.py

    from docs_src.dependencies.tutorial008b import app
    
    client = TestClient(app)
    
    
    def test_get_no_item():
        response = client.get("/items/foo")
        assert response.status_code == 404, response.text
        assert response.json() == {"detail": "Item not found"}
    
    
    def test_owner_error():
        response = client.get("/items/plumbus")
        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Owner error: Rick"}
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Dec 26 20:37:34 UTC 2023
    - 697 bytes
    - Viewed (0)
  6. src/main/webapp/js/bootstrap.min.js

    "pointerup"+F,DRAG_START:"dragstart"+F,LOAD_DATA_API:"load"+F+U,CLICK_DATA_API:"click"+F+U},z="carousel",X="active",$="slide",G="carousel-item-right",J="carousel-item-left",Z="carousel-item-next",tt="carousel-item-prev",et="pointer-event",nt=".active",it=".active.carousel-item",ot=".carousel-item",rt=".carousel-item img",st=".carousel-item-next, .carousel-item-prev",at=".carousel-indicators",lt="[data-slide], [data-slide-to]",ct='[data-ride="carousel"]',ht={TOUCH:"touch",PEN:"pen"},ut=function(){function...
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Fri Feb 07 10:28:50 UTC 2020
    - 58.6K bytes
    - Viewed (0)
  7. docs/ko/docs/tutorial/query-params-str-validations.md

    {!../../docs_src/query_params_str_validations/tutorial008.py!}
    ```
    
    ## 별칭 매개변수
    
    매개변수가 `item-query`이길 원한다고 가정해 봅시다.
    
    마치 다음과 같습니다:
    
    ```
    http://127.0.0.1:8000/items/?item-query=foobaritems
    ```
    
    그러나 `item-query`은 유효한 파이썬 변수 이름이 아닙니다.
    
    가장 가까운 것은 `item_query`일 겁니다.
    
    하지만 정확히`item-query`이길 원합니다...
    
    이럴 경우 `alias`를 선언할 수 있으며, 해당 별칭은 매개변수 값을 찾는 데 사용됩니다:
    
    ```Python hl_lines="9"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_dependencies/test_tutorial012_an_py39.py

    def test_get_valid_headers_items(client: TestClient):
        response = client.get(
            "/items/",
            headers={
                "X-Token": "fake-super-secret-token",
                "X-Key": "fake-super-secret-key",
            },
        )
        assert response.status_code == 200, response.text
        assert response.json() == [{"item": "Portal Gun"}, {"item": "Plumbus"}]
    
    
    @needs_py39
    def test_get_valid_headers_users(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  9. docs/uk/docs/tutorial/body.md

    ////
    
    ...і вкажіть її тип як модель, яку ви створили, `Item`.
    
    ## Результати
    
    Лише з цим оголошенням типу Python **FastAPI** буде:
    
    * Читати тіло запиту як JSON.
    * Перетворювати відповідні типи (якщо потрібно).
    * Валідувати дані.
        * Якщо дані недійсні, він поверне гарну та чітку помилку, вказуючи, де саме і які дані були неправильними.
    * Надавати отримані дані у параметрі `item`.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_dependencies/test_tutorial008d_an_py39.py

    
    @needs_py39
    def test_get_no_item(client: TestClient):
        response = client.get("/items/foo")
        assert response.status_code == 404, response.text
        assert response.json() == {"detail": "Item not found, there's only a plumbus here"}
    
    
    @needs_py39
    def test_get(client: TestClient):
        response = client.get("/items/plumbus")
        assert response.status_code == 200, response.text
        assert response.json() == "plumbus"
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 1.3K bytes
    - Viewed (0)
Back to top