Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1171 - 1180 of 1,977 for Fastapi (0.06 sec)

  1. tests/test_tutorial/test_body_updates/test_tutorial001_py39.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39, needs_pydanticv1, needs_pydanticv2
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.body_updates.tutorial001_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_get(client: TestClient):
        response = client.get("/items/baz")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Sep 28 04:14:40 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  2. docs/em/docs/advanced/custom-response.md

    ⭕ 📨, 📨 `Response` 🔗 🌅 ⏩ 🌘 🛬 📖.
    
    👉 ↩️ 🔢, FastAPI 🔜 ✔ 🔠 🏬 🔘 & ⚒ 💭 ⚫️ 🎻 ⏮️ 🎻, ⚙️ 🎏 [🎻 🔗 🔢](../tutorial/encoder.md){.internal-link target=_blank} 🔬 🔰. 👉 ⚫️❔ ✔ 👆 📨 **❌ 🎚**, 🖼 💽 🏷.
    
    ✋️ 🚥 👆 🎯 👈 🎚 👈 👆 🛬 **🎻 ⏮️ 🎻**, 👆 💪 🚶‍♀️ ⚫️ 🔗 📨 🎓 & ❎ ➕ 🌥 👈 FastAPI 🔜 ✔️ 🚶‍♀️ 👆 📨 🎚 🔘 `jsonable_encoder` ⏭ 🚶‍♀️ ⚫️ 📨 🎓.
    
    ```Python hl_lines="2  7"
    {!../../docs_src/custom_response/tutorial001b.py!}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  3. tests/test_dependency_contextmanager.py

    import json
    from typing import Dict
    
    import pytest
    from fastapi import BackgroundTasks, Depends, FastAPI
    from fastapi.responses import StreamingResponse
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    state = {
        "/async": "asyncgen not started",
        "/sync": "generator not started",
        "/async_raise": "asyncgen raise not started",
        "/sync_raise": "generator raise not started",
        "context_a": "not started a",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 17 04:13:50 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  4. .github/actions/people/action.yml

    name: "Generate FastAPI People"
    description: "Generate the data for the FastAPI People page"
    author: "Sebastián Ramírez <******@****.***>"
    inputs:
      token:
        description: 'User token, to read the GitHub API. Can be passed in using {{ secrets.FASTAPI_PEOPLE }}'
        required: true
    runs:
      using: 'docker'
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Jul 09 15:44:40 UTC 2023
    - 333 bytes
    - Viewed (0)
  5. docs/de/docs/advanced/wsgi.md

    ```Python hl_lines="2-3  23"
    {!../../docs_src/wsgi/tutorial001.py!}
    ```
    
    ## Es ansehen
    
    Jetzt wird jede Anfrage unter dem Pfad `/v1/` von der Flask-Anwendung verarbeitet.
    
    Und der Rest wird von **FastAPI** gehandhabt.
    
    Wenn Sie das mit Uvicorn ausführen und auf <a href="http://localhost:8000/v1/" class="external-link" target="_blank">http://localhost:8000/v1/</a> gehen, sehen Sie die Response von Flask:
    
    ```txt
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  6. docs/pt/docs/advanced/wsgi.md

    ```Python hl_lines="2-3  23"
    {!../../docs_src/wsgi/tutorial001.py!}
    ```
    
    ## Conferindo
    
    Agora todas as requisições sob o caminho `/v1/` serão manipuladas pela aplicação utilizando Flask.
    
    E o resto será manipulado pelo **FastAPI**.
    
    Se você rodar a aplicação e ir até <a href="http://localhost:8000/v1/" class="external-link" target="_blank">http://localhost:8000/v1/</a>, você verá o retorno do Flask:
    
    ```txt
    Hello, World from Flask!
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_query_params_str_validations/test_tutorial012_an.py

    from fastapi.testclient import TestClient
    
    from docs_src.query_params_str_validations.tutorial012_an import app
    
    client = TestClient(app)
    
    
    def test_default_query_values():
        url = "/items/"
        response = client.get(url)
        assert response.status_code == 200, response.text
        assert response.json() == {"q": ["foo", "bar"]}
    
    
    def test_multi_query_values():
        url = "/items/?q=baz&q=foobar"
        response = client.get(url)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_query_params_str_validations/test_tutorial014_an_py310.py

    import pytest
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.query_params_str_validations.tutorial014_an_py310 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py310
    def test_hidden_query(client: TestClient):
        response = client.get("/items?hidden_query=somevalue")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  9. docs/zh/docs/deployment/docker.md

    Successfully installed fastapi pydantic uvicorn
    ```
    
    </div>
    
    /// info
    
    还有其他文件格式和工具来定义和安装依赖项。
    
     我将在下面的部分中向你展示一个使用 Poetry 的示例。 👇
    
    ///
    
    ### 创建 **FastAPI** 代码
    
    * 创建`app`目录并进入。
    * 创建一个空文件`__init__.py`。
    * 创建一个 `main.py` 文件:
    
    
    
    ```Python
    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def read_root():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Aug 12 21:47:53 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  10. docs/en/docs/advanced/response-directly.md

    **FastAPI** provides the same `starlette.responses` as `fastapi.responses` just as a convenience for you, the developer. But most of the available responses come directly from Starlette.
    
    ///
    
    ## Returning a custom `Response`
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3K bytes
    - Viewed (0)
Back to top