Search Options

Results per page
Sort
Preferred Languages
Advance

Results 751 - 760 of 1,977 for Fastapi (0.07 sec)

  1. docs/zh/docs/tutorial/security/oauth2-jwt.md

    **高级用户指南**中将介绍如何使用 `scopes`,及如何把 `scopes` 集成至 **FastAPI**。
    
    ## 小结
    
    至此,您可以使用 OAuth2 和 JWT 等标准配置安全的 **FastAPI** 应用。
    
    几乎在所有框架中,处理安全问题很快都会变得非常复杂。
    
    有些包为了简化安全流,不得不在数据模型、数据库和功能上做出妥协。而有些过于简化的软件包其实存在了安全隐患。
    
    ---
    
    **FastAPI** 不向任何数据库、数据模型或工具做妥协。
    
    开发者可以灵活选择最适合项目的安全机制。
    
    还可以直接使用 `passlib` 和 `PyJWT` 等维护良好、使用广泛的包,这是因为 **FastAPI** 不需要任何复杂机制,就能集成外部的包。
    
    而且,**FastAPI** 还提供了一些工具,在不影响灵活、稳定和安全的前提下,尽可能地简化安全机制。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11K bytes
    - Viewed (0)
  2. docs/zh/docs/advanced/events.md

    **FastAPI** 支持定义在应用启动前,或应用关闭后执行的事件处理器(函数)。
    
    事件函数既可以声明为异步函数(`async def`),也可以声明为普通函数(`def`)。
    
    /// warning | "警告"
    
    **FastAPI** 只执行主应用中的事件处理器,不执行[子应用 - 挂载](sub-applications.md){.internal-link target=_blank}中的事件处理器。
    
    ///
    
    ## `startup` 事件
    
    使用 `startup` 事件声明 `app` 启动前运行的函数:
    
    ```Python hl_lines="8"
    {!../../docs_src/events/tutorial001.py!}
    ```
    
    本例中,`startup` 事件处理器函数为项目数据库(只是**字典**)提供了一些初始值。
    
    **FastAPI** 支持多个事件处理器函数。
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  3. README.md

      <a href="https://fastapi.tiangolo.com"><img src="https://fastapi.tiangolo.com/img/logo-margin/logo-teal.png" alt="FastAPI"></a>
    </p>
    <p align="center">
        FastAPI framework, high performance, easy to learn, fast to code, ready for production
    </p>
    <p align="center">
    <a href="https://github.com/fastapi/fastapi/actions?query=workflow%3ATest+event%3Apush+branch%3Amaster" target="_blank">
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Oct 31 09:13:26 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  4. docs_src/additional_responses/tutorial001.py

    from fastapi import FastAPI
    from fastapi.responses import JSONResponse
    from pydantic import BaseModel
    
    
    class Item(BaseModel):
        id: str
        value: str
    
    
    class Message(BaseModel):
        message: str
    
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}", response_model=Item, responses={404: {"model": Message}})
    async def read_item(item_id: str):
        if item_id == "foo":
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 26 13:32:30 UTC 2022
    - 506 bytes
    - Viewed (0)
  5. fastapi/applications.py

    AppType = TypeVar("AppType", bound="FastAPI")
    
    
    class FastAPI(Starlette):
        """
        `FastAPI` app class, the main entrypoint to use FastAPI.
    
        Read more in the
        [FastAPI docs for First Steps](https://fastapi.tiangolo.com/tutorial/first-steps/).
    
        ## Example
    
        ```python
        from fastapi import FastAPI
    
        app = FastAPI()
        ```
        """
    
        def __init__(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 17 04:52:31 UTC 2024
    - 172.2K bytes
    - Viewed (0)
  6. docs/en/docs/deployment/docker.md

    ```Python
    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: Union[str, None] = None):
        return {"item_id": item_id, "q": q}
    ```
    
    ### Dockerfile
    
    Now in the same project directory create a file `Dockerfile` with:
    
    ```{ .dockerfile .annotate }
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Sep 18 16:09:57 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  7. .github/workflows/people.yml

    name: FastAPI People
    
    on:
      schedule:
        - cron: "0 14 1 * *"
      workflow_dispatch:
        inputs:
          debug_enabled:
            description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
            required: false
            default: 'false'
    
    jobs:
      fastapi-people:
        if: github.repository_owner == 'fastapi'
        runs-on: ubuntu-latest
        steps:
          - name: Dump GitHub context
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Jul 29 23:35:07 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  8. docs/pt/docs/tutorial/debugging.md

    ---
    
    Por exemplo, no Visual Studio Code, você pode:
    
    * Ir para o painel "Debug".
    * "Add configuration...".
    * Selecionar "Python"
    * Executar o depurador com a opção "`Python: Current File (Integrated Terminal)`".
    
    Em seguida, ele iniciará o servidor com seu código **FastAPI**, parará em seus pontos de interrupção, etc.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  9. docs_src/additional_responses/tutorial002.py

    from typing import Union
    
    from fastapi import FastAPI
    from fastapi.responses import FileResponse
    from pydantic import BaseModel
    
    
    class Item(BaseModel):
        id: str
        value: str
    
    
    app = FastAPI()
    
    
    @app.get(
        "/items/{item_id}",
        response_model=Item,
        responses={
            200: {
                "content": {"image/png": {}},
                "description": "Return the JSON item or an image.",
            }
        },
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 628 bytes
    - Viewed (0)
  10. docs/ru/docs/tutorial/debugging.md

    ---
    
    Например, в Visual Studio Code вы можете выполнить следующие шаги:
    
    * Перейдите на панель "Debug".
    * Выберите "Add configuration...".
    * Выберите "Python"
    * Запустите отладчик "`Python: Current File (Integrated Terminal)`".
    
    Это запустит сервер с вашим **FastAPI** кодом, остановится на точках останова, и т.д.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.8K bytes
    - Viewed (0)
Back to top