Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1131 - 1140 of 1,916 for FastApi (0.04 sec)

  1. docs/en/docs/advanced/sub-applications.md

    # Sub Applications - Mounts { #sub-applications-mounts }
    
    If you need to have two independent FastAPI applications, with their own independent OpenAPI and their own docs UIs, you can have a main app and "mount" one (or more) sub-application(s).
    
    ## Mounting a **FastAPI** application { #mounting-a-fastapi-application }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 3K bytes
    - Viewed (0)
  2. docs/es/docs/tutorial/response-status-code.md

    /// note | Detalles técnicos
    
    También podrías usar `from starlette import status`.
    
    **FastAPI** proporciona el mismo `starlette.status` como `fastapi.status` solo como una conveniencia para ti, el desarrollador. Pero proviene directamente de Starlette.
    
    ///
    
    ## Cambiando el valor por defecto { #changing-the-default }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  3. docs/zh/docs/advanced/openapi-webhooks.md

    ## 使用 `FastAPI` 和 OpenAPI 文档化网络钩子
    
    使用 **FastAPI**,您可以利用 OpenAPI 来自定义这些网络钩子的名称、您的应用可以发送的 HTTP 操作类型(例如 `POST`、`PUT` 等)以及您的应用将发送的**请求体**。
    
    这能让您的用户更轻松地**实现他们的 API** 来接收您的**网络钩子**请求,他们甚至可能能够自动生成一些自己的 API 代码。
    
    /// info
    
    网络钩子在 OpenAPI 3.1.0 及以上版本中可用,FastAPI `0.99.0` 及以上版本支持。
    
    ///
    
    ## 带有网络钩子的应用程序
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Dec 19 15:30:38 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  4. tests/test_request_params/test_cookie/test_optional_str.py

    from typing import Annotated, Optional
    
    import pytest
    from fastapi import Cookie, FastAPI
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, Field
    
    app = FastAPI()
    
    # =====================================================================================
    # Without aliases
    
    
    @app.get("/optional-str")
    async def read_optional_str(p: Annotated[Optional[str], Cookie()] = None):
        return {"p": p}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  5. docs_src/advanced_middleware/tutorial001_py39.py

    from fastapi import FastAPI
    from fastapi.middleware.httpsredirect import HTTPSRedirectMiddleware
    
    app = FastAPI()
    
    app.add_middleware(HTTPSRedirectMiddleware)
    
    
    @app.get("/")
    async def main():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 231 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_websockets/test_tutorial001.py

    import pytest
    from fastapi.testclient import TestClient
    from fastapi.websockets import WebSocketDisconnect
    
    from docs_src.websockets.tutorial001_py39 import app
    
    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/")
        assert response.status_code == 200, response.text
        assert b"<!DOCTYPE html>" in response.content
    
    
    def test_websocket():
        with pytest.raises(WebSocketDisconnect):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 827 bytes
    - Viewed (0)
  7. tests/test_schema_extra_examples.py

    from typing import Union
    
    import pytest
    from fastapi import Body, Cookie, FastAPI, Header, Path, Query
    from fastapi.exceptions import FastAPIDeprecationWarning
    from fastapi.testclient import TestClient
    from pydantic import BaseModel, ConfigDict
    
    
    def create_app():
        app = FastAPI()
    
        class Item(BaseModel):
            data: str
    
            model_config = ConfigDict(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 32.2K bytes
    - Viewed (0)
  8. docs_src/custom_response/tutorial006c_py39.py

    from fastapi import FastAPI
    from fastapi.responses import RedirectResponse
    
    app = FastAPI()
    
    
    @app.get("/pydantic", response_class=RedirectResponse, status_code=302)
    async def redirect_pydantic():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 237 bytes
    - Viewed (0)
  9. docs/ru/docs/tutorial/request-forms.md

    ```console
    $ pip install python-multipart
    ```
    
    ///
    
    ## Импорт `Form` { #import-form }
    
    Импортируйте `Form` из `fastapi`:
    
    {* ../../docs_src/request_forms/tutorial001_an_py39.py hl[3] *}
    
    ## Определение параметров `Form` { #define-form-parameters }
    
    Создайте параметры формы так же, как это делается для `Body` или `Query`:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Sep 30 11:24:39 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  10. docs/zh/docs/tutorial/index.md

    **强烈建议**您在本地编写或复制代码,对其进行编辑并运行。
    
    在编辑器中使用 FastAPI 会真正地展现出它的优势:只需要编写很少的代码,所有的类型检查,代码补全等等。
    
    ---
    
    ## 安装 FastAPI
    
    第一个步骤是安装 FastAPI.
    
    请确保您创建并激活一个[虚拟环境](../virtual-environments.md){.internal-link target=_blank},然后**安装 FastAPI**:
    
    <div class="termy">
    
    ```console
    $ pip install "fastapi[standard]"
    
    ---> 100%
    ```
    
    </div>
    
    /// note
    
    当您使用 `pip install "fastapi[standard]"` 进行安装时,它会附带一些默认的可选标准依赖项。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Mar 31 08:15:11 UTC 2025
    - 4.6K bytes
    - Viewed (0)
Back to top