Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1421 - 1430 of 1,977 for Fastapi (0.05 sec)

  1. docs/de/docs/advanced/additional-status-codes.md

    ///
    
    /// note | "Technische Details"
    
    Sie können auch `from starlette.responses import JSONResponse` verwenden.
    
    **FastAPI** bietet dieselben `starlette.responses` auch via `fastapi.responses` an, als Annehmlichkeit für Sie, den Entwickler. Die meisten verfügbaren Responses kommen aber direkt von Starlette. Das Gleiche gilt für `status`.
    
    ///
    
    ## OpenAPI- und API-Dokumentation
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  2. docs/pt/docs/advanced/additional-status-codes.md

    ///
    
    /// note | "Detalhes técnicos"
    
    Você também pode utilizar `from starlette.responses import JSONResponse`.
    
    O **FastAPI** disponibiliza o `starlette.responses` como `fastapi.responses` apenas por conveniência para você, o programador. Porém a maioria dos retornos disponíveis vem diretamente do Starlette. O mesmo com `status`.
    
    ///
    
    ## OpenAPI e documentação da API
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  3. docs/ru/docs/tutorial/query-params-str-validations.md

    /// note | "Технические детали"
    
    FastAPI определит параметр `q` как необязательный, потому что его значение по умолчанию `= None`.
    
    `Union` в `Union[str, None]` позволит редактору кода оказать вам лучшую поддержку и найти ошибки.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 37.5K bytes
    - Viewed (0)
  4. docs/zh/docs/tutorial/encoder.md

    # JSON 兼容编码器
    
    在某些情况下,您可能需要将数据类型(如Pydantic模型)转换为与JSON兼容的数据类型(如`dict`、`list`等)。
    
    比如,如果您需要将其存储在数据库中。
    
    对于这种要求, **FastAPI**提供了`jsonable_encoder()`函数。
    
    ## 使用`jsonable_encoder`
    
    让我们假设你有一个数据库名为`fake_db`,它只能接收与JSON兼容的数据。
    
    例如,它不接收`datetime`这类的对象,因为这些对象与JSON不兼容。
    
    因此,`datetime`对象必须将转换为包含<a href="https://en.wikipedia.org/wiki/ISO_8601" class="external-link" target="_blank">ISO格式化</a>的`str`类型对象。
    
    同样,这个数据库也不会接收Pydantic模型(带有属性的对象),而只接收`dict`。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_schema_extra_example/test_tutorial004_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.schema_extra_example.tutorial004_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    # Test required and embedded body parameters with no bodies sent
    @needs_py310
    def test_post_body_example(client: TestClient):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_dependencies/test_tutorial001_an.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    from docs_src.dependencies.tutorial001_an import app
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        "path,expected_status,expected_response",
        [
            ("/items", 200, {"q": None, "skip": 0, "limit": 100}),
            ("/items?q=foo", 200, {"q": "foo", "skip": 0, "limit": 100}),
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_extra_data_types/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.extra_data_types.tutorial001_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_extra_types(client: TestClient):
        item_id = "ff97dd87-a4a5-4a12-b412-cde99f33e00e"
        data = {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Apr 19 00:11:40 UTC 2024
    - 7K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_query_params/test_tutorial006.py

    import pytest
    from dirty_equals import IsDict
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.query_params.tutorial006 import app
    
        c = TestClient(app)
        return c
    
    
    def test_foo_needy_very(client: TestClient):
        response = client.get("/items/foo?needy=very")
        assert response.status_code == 200
        assert response.json() == {
            "item_id": "foo",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  9. docs/pt/docs/deployment/concepts.md

    ### Pequenos erros são tratados automaticamente
    
    Ao criar APIs da web com FastAPI, se houver um erro em nosso código, o FastAPI normalmente o conterá na única solicitação que acionou o erro. 🛡
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Oct 04 11:04:50 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  10. docs/de/docs/tutorial/dependencies/sub-dependencies.md

    # Unterabhängigkeiten
    
    Sie können Abhängigkeiten erstellen, die **Unterabhängigkeiten** haben.
    
    Diese können so **tief** verschachtelt sein, wie nötig.
    
    **FastAPI** kümmert sich darum, sie aufzulösen.
    
    ## Erste Abhängigkeit, „Dependable“
    
    Sie könnten eine erste Abhängigkeit („Dependable“) wie folgt erstellen:
    
    //// tab | Python 3.10+
    
    ```Python hl_lines="8-9"
    {!> ../../docs_src/dependencies/tutorial005_an_py310.py!}
    ```
    
    ////
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.2K bytes
    - Viewed (0)
Back to top