Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1481 - 1490 of 1,977 for Fastapi (0.05 sec)

  1. tests/test_tutorial/test_query_params_str_validations/test_tutorial010_an_py39.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.query_params_str_validations.tutorial010_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_query_params_str_validations_no_query(client: TestClient):
        response = client.get("/items/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_request_files/test_tutorial003_an.py

    from fastapi.testclient import TestClient
    
    from docs_src.request_files.tutorial003_an import app
    
    client = TestClient(app)
    
    
    def test_post_files(tmp_path):
        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(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  3. docs_src/sql_databases_peewee/sql_app/main.py

    import time
    from typing import List
    
    from fastapi import Depends, FastAPI, HTTPException
    
    from . import crud, database, models, schemas
    from .database import db_state_default
    
    database.db.connect()
    database.db.create_tables([models.User, models.Item])
    database.db.close()
    
    app = FastAPI()
    
    sleep_time = 10
    
    
    async def reset_db_state():
        database.db._state._state.set(db_state_default.copy())
        database.db._state.reset()
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 2.2K bytes
    - Viewed (0)
  4. docs/ja/docs/tutorial/response-model.md

    {!../../docs_src/response_model/tutorial003.py!}
    ```
    
    そのため、**FastAPI** は出力モデルで宣言されていない全てのデータをフィルタリングしてくれます(Pydanticを使用)。
    
    ## ドキュメントを見る
    
    自動ドキュメントを見ると、入力モデルと出力モデルがそれぞれ独自のJSON Schemaを持っていることが確認できます。
    
    <img src="https://fastapi.tiangolo.com/img/tutorial/response-model/image01.png">
    
    そして、両方のモデルは、対話型のAPIドキュメントに使用されます:
    
    <img src="https://fastapi.tiangolo.com/img/tutorial/response-model/image02.png">
    
    ## レスポンスモデルのエンコーディングパラメータ
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  5. docs/uk/docs/python-types.md

    ///
    
    **FastAPI** повністю базується на Pydantic.
    
    Ви побачите набагато більше цього всього на практиці в [Tutorial - User Guide](tutorial/index.md){.internal-link target=_blank}.
    
    ## Анотації типів у **FastAPI**
    
    **FastAPI** використовує ці підказки для виконання кількох речей.
    
    З **FastAPI** ви оголошуєте параметри з підказками типу, і отримуєте:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 19.5K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_request_form_models/test_tutorial002_an_py39.py

    import pytest
    from fastapi.testclient import TestClient
    
    from tests.utils import needs_py39, needs_pydanticv2
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.request_form_models.tutorial002_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_pydanticv2
    @needs_py39
    def test_post_body_form(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 17:31:18 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_body_fields/test_tutorial001_an_py310.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_fields.tutorial001_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_items_5(client: TestClient):
        response = client.put("/items/5", json={"item": {"name": "Foo", "price": 3.0}})
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_request_files/test_tutorial001_02_an.py

    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.request_files.tutorial001_02_an import app
    
    client = TestClient(app)
    
    
    def test_post_form_no_body():
        response = client.post("/files/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "No file sent"}
    
    
    def test_post_uploadfile_no_body():
        response = client.post("/uploadfile/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 8.2K bytes
    - Viewed (0)
  9. docs/ko/docs/tutorial/metadata.md

    # 메타데이터 및 문서화 URL
    
    **FastAPI** 응용 프로그램에서 다양한 메타데이터 구성을 사용자 맞춤 설정할 수 있습니다.
    
    ## API에 대한 메타데이터
    
    OpenAPI 명세 및 자동화된 API 문서 UI에 사용되는 다음 필드를 설정할 수 있습니다:
    
    | 매개변수 | 타입 | 설명 |
    |----------|------|-------|
    | `title` | `str` | API의 제목입니다. |
    | `summary` | `str` | API에 대한 짧은 요약입니다. <small>OpenAPI 3.1.0, FastAPI 0.99.0부터 사용 가능</small> |
    | `description` | `str` | API에 대한 짧은 설명입니다. 마크다운을 사용할 수 있습니다. |
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 29 10:36:06 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  10. docs/ko/docs/tutorial/query-params.md

    {!../../docs_src/query_params/tutorial002.py!}
    ```
    
    이 경우 함수 매개변수 `q`는 선택적이며 기본값으로 `None` 값이 됩니다.
    
    /// check | "확인"
    
    **FastAPI**는 `item_id`가 경로 매개변수이고 `q`는 경로 매개변수가 아닌 쿼리 매개변수라는 것을 알 정도로 충분히 똑똑합니다.
    
    ///
    
    /// note | "참고"
    
    FastAPI는 `q`가 `= None`이므로 선택적이라는 것을 인지합니다.
    
    `Union[str, None]`에 있는 `Union`은 FastAPI(FastAPI는 `str` 부분만 사용합니다)가 사용하는게 아니지만, `Union[str, None]`은 편집기에게 코드에서 오류를 찾아낼 수 있게 도와줍니다.
    
    ///
    
    ## 쿼리 매개변수 형변환
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.3K bytes
    - Viewed (0)
Back to top