Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 151 - 160 of 1,089 for itens (0.02 seconds)

  1. tests/test_tutorial/test_additional_responses/test_tutorial003.py

    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.get("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"id": "foo", "value": "there goes my hero"}
    
    
    def test_path_operation_not_found():
        response = client.get("/items/bar")
        assert response.status_code == 404, response.text
        assert response.json() == {"message": "Item not found"}
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 5.3K bytes
    - Click Count (0)
  2. docs_src/path_operation_configuration/tutorial006_py310.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/", tags=["items"])
    async def read_items():
        return [{"name": "Foo", "price": 42}]
    
    
    @app.get("/users/", tags=["users"])
    async def read_users():
        return [{"username": "johndoe"}]
    
    
    @app.get("/elements/", tags=["items"], deprecated=True)
    async def read_elements():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 365 bytes
    - Click Count (0)
  3. docs/ko/docs/tutorial/path-params.md

    이 예제를 실행하고 [http://127.0.0.1:8000/items/3](http://127.0.0.1:8000/items/3)을 열면, 다음 응답을 볼 수 있습니다:
    
    ```JSON
    {"item_id":3}
    ```
    
    /// check | 확인
    
    함수가 받은(반환도 하는) 값은 문자열 `"3"`이 아니라 파이썬 `int` 형인 `3`입니다.
    
    즉, 타입 선언을 하면 **FastAPI**는 자동으로 요청을 <dfn title="HTTP 요청에서 전달되는 문자열을 파이썬 데이터로 변환">"파싱"</dfn>합니다.
    
    ///
    
    ## 데이터 검증 { #data-validation }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 9.9K bytes
    - Click Count (0)
  4. docs/de/docs/advanced/security/oauth2-scopes.md

    Und wenn Sie den Scope `me`, aber nicht den Scope `items` auswählen, können Sie auf `/users/me/` zugreifen, aber nicht auf `/users/me/items/`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 15.7K bytes
    - Click Count (0)
  5. docs/pt/docs/tutorial/path-params.md

    O valor do parâmetro de path `item_id` será passado para a sua função como o argumento `item_id`.
    
    Então, se você executar este exemplo e acessar [http://127.0.0.1:8000/items/foo](http://127.0.0.1:8000/items/foo), você verá uma resposta:
    
    ```JSON
    {"item_id":"foo"}
    ```
    
    ## Parâmetros de path com tipos { #path-parameters-with-types }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 9.5K bytes
    - Click Count (0)
  6. docs/zh/docs/tutorial/path-params.md

    运行示例并访问 [http://127.0.0.1:8000/items/3](http://127.0.0.1:8000/items/3),返回的响应如下:
    
    ```JSON
    {"item_id":3}
    ```
    
    /// check | 检查
    
    注意,函数接收并返回的值是 `3`( `int`),不是 `"3"`(`str`)。
    
    **FastAPI** 通过类型声明自动进行请求的<dfn title="将来自 HTTP 请求中的字符串转换为 Python 数据类型">解析</dfn>。
    
    ///
    
    ## 数据校验 { #data-validation }
    
    通过浏览器访问 [http://127.0.0.1:8000/items/foo](http://127.0.0.1:8000/items/foo),接收如下 HTTP 错误信息:
    
    ```JSON
    {
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 7.6K bytes
    - Click Count (0)
  7. src/main/java/org/codelibs/fess/dict/mapping/CharMappingFile.java

            return OptionalEntity.empty();
        }
    
        /**
         * Retrieves a paginated list of character mapping items.
         *
         * @param offset the starting index for pagination (0-based)
         * @param size the maximum number of items to return
         * @return a PagingList containing the requested subset of mapping items
         */
        @Override
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sat Dec 20 05:56:45 GMT 2025
    - 15.3K bytes
    - Click Count (0)
  8. docs_src/query_params_str_validations/tutorial006c_py310.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: str | None = 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: Sat Feb 15 16:23:59 GMT 2025
    - 261 bytes
    - Click Count (0)
  9. docs_src/query_params_str_validations/tutorial005_py310.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: str = Query(default="fixedquery", 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
    - 276 bytes
    - Click Count (0)
  10. docs_src/query_params_str_validations/tutorial008_an_py310.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(
        q: Annotated[
            str | None,
            Query(
                title="Query string",
                description="Query string for the items to search in the database that have a good match",
                min_length=3,
            ),
        ] = None,
    ):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        if q:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 498 bytes
    - Click Count (0)
Back to Top