Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 21 - 30 of 1,133 for path1b (0.03 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. tests/test_tutorial/test_request_files/test_tutorial002.py

                }
            ]
        }
    
    
    def test_post_files(tmp_path, app: FastAPI):
        path = tmp_path / "test.txt"
        path.write_bytes(b"<file content>")
        path2 = tmp_path / "test2.txt"
        path2.write_bytes(b"<file content2>")
    
        client = TestClient(app)
        with path.open("rb") as file, path2.open("rb") as file2:
            response = client.post(
                "/files/",
                files=(
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 8.2K bytes
    - Click Count (0)
  2. tests/test_tutorial/test_request_files/test_tutorial001_02.py

    
    def test_post_file(tmp_path: Path, client: TestClient):
        path = tmp_path / "test.txt"
        path.write_bytes(b"<file content>")
    
        with path.open("rb") as file:
            response = client.post("/files/", files={"file": file})
        assert response.status_code == 200, response.text
        assert response.json() == {"file_size": 14}
    
    
    def test_post_upload_file(tmp_path: Path, client: TestClient):
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 7.4K bytes
    - Click Count (0)
  3. docs/es/docs/advanced/path-operation-advanced-configuration.md

    ### Usar el nombre de la *path operation function* como el operationId { #using-the-path-operation-function-name-as-the-operationid }
    
    Si quieres usar los nombres de las funciones de tus APIs como `operationId`s, puedes iterar sobre todas ellas y sobrescribir el `operation_id` de cada *path operation* usando su `APIRoute.name`.
    
    Deberías hacerlo después de agregar todas tus *path operations*.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 8.3K bytes
    - Click Count (0)
  4. docs/pt/docs/advanced/path-operation-advanced-configuration.md

    {
        "openapi": "3.1.0",
        "info": {
            "title": "FastAPI",
            "version": "0.1.0"
        },
        "paths": {
            "/items/": {
                "get": {
                    "summary": "Read Items",
                    "operationId": "read_items_items__get",
                    "responses": {
                        "200": {
                            "description": "Successful Response",
                            "content": {
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 8.7K bytes
    - Click Count (0)
  5. tests/test_tutorial/test_static_files/test_tutorial001.py

    import os
    from pathlib import Path
    
    import pytest
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(scope="module")
    def client():
        static_dir: Path = Path(os.getcwd()) / "static"
        static_dir.mkdir(exist_ok=True)
        sample_file = static_dir / "sample.txt"
        sample_file.write_text("This is a sample static file.")
        from docs_src.static_files.tutorial001_py39 import app
    
        with TestClient(app) as client:
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Dec 26 10:43:02 GMT 2025
    - 1.1K bytes
    - Click Count (0)
  6. docs/en/docs/tutorial/path-params-numeric-validations.md

    # Path Parameters and Numeric Validations { #path-parameters-and-numeric-validations }
    
    In the same way that you can declare more validations and metadata for query parameters with `Query`, you can declare the same type of validations and metadata for path parameters with `Path`.
    
    ## Import `Path` { #import-path }
    
    First, import `Path` from `fastapi`, and import `Annotated`:
    
    {* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[1,3] *}
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 6.1K bytes
    - Click Count (0)
  7. docs/zh/docs/tutorial/path-params-numeric-validations.md

    # 路径参数和数值校验
    
    与使用 `Query` 为查询参数声明更多的校验和元数据的方式相同,你也可以使用 `Path` 为路径参数声明相同类型的校验和元数据。
    
    ## 导入 Path
    
    首先,从 `fastapi` 导入 `Path`:
    
    {* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[1,3] *}
    
    ## 声明元数据
    
    你可以声明与 `Query` 相同的所有参数。
    
    例如,要声明路径参数 `item_id`的 `title` 元数据值,你可以输入:
    
    {* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[10] *}
    
    /// note
    
    路径参数总是必需的,因为它必须是路径的一部分。
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Nov 18 02:25:44 GMT 2024
    - 4.6K bytes
    - Click Count (0)
  8. docs/ko/docs/tutorial/path-params-numeric-validations.md

    # 경로 매개변수와 숫자 검증
    
    `Query`를 사용하여 쿼리 매개변수에 더 많은 검증과 메타데이터를 선언하는 방법과 동일하게 `Path`를 사용하여 경로 매개변수에 검증과 메타데이터를 같은 타입으로 선언할 수 있습니다.
    
    ## 경로 임포트
    
    먼저 `fastapi`에서 `Path`를 임포트합니다:
    
    {* ../../docs_src/path_params_numeric_validations/tutorial001.py hl[3] *}
    
    ## 메타데이터 선언
    
    `Query`에 동일한 매개변수를 선언할 수 있습니다.
    
    예를 들어, `title` 메타데이터 값을 경로 매개변수 `item_id`에 선언하려면 다음과 같이 입력할 수 있습니다:
    
    {* ../../docs_src/path_params_numeric_validations/tutorial001.py hl[10] *}
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Nov 18 02:25:44 GMT 2024
    - 5.4K bytes
    - Click Count (0)
  9. docs/ja/docs/advanced/path-operation-advanced-configuration.md

    # Path Operationの高度な設定
    
    ## OpenAPI operationId
    
    /// warning | 注意
    
    あなたがOpenAPIの「エキスパート」でなければ、これは必要ないかもしれません。
    
    ///
    
    *path operation* で `operation_id` パラメータを利用することで、OpenAPIの `operationId` を設定できます。
    
    `operation_id` は各オペレーションで一意にする必要があります。
    
    {* ../../docs_src/path_operation_advanced_configuration/tutorial001.py hl[6] *}
    
    ### *path operation関数* の名前をoperationIdとして使用する
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Mon Nov 18 02:25:44 GMT 2024
    - 2.2K bytes
    - Click Count (0)
  10. tests/test_tutorial/test_request_files/test_tutorial003.py

        client = TestClient(app)
        return client
    
    
    def test_post_files(tmp_path, app: FastAPI):
        path = tmp_path / "test.txt"
        path.write_bytes(b"<file content>")
        path2 = tmp_path / "test2.txt"
        path2.write_bytes(b"<file content2>")
    
        client = TestClient(app)
        with path.open("rb") as file, path2.open("rb") as file2:
            response = client.post(
                "/files/",
                files=(
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 7.5K bytes
    - Click Count (0)
Back to Top