Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1151 - 1160 of 1,916 for FastApi (0.04 sec)

  1. tests/test_param_in_path_and_dependency.py

    from fastapi import Depends, FastAPI
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    async def user_exists(user_id: int):
        return True
    
    
    @app.get("/users/{user_id}", dependencies=[Depends(user_exists)])
    async def read_users(user_id: int):
        pass
    
    
    client = TestClient(app)
    
    
    def test_read_users():
        response = client.get("/users/42")
        assert response.status_code == 200, response.text
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  2. docs/pt/docs/tutorial/security/simple-oauth2.md

    * Um `client_secret` opcional (não precisamos dele em nosso exemplo).
    
    /// info | Informação
    
    O `OAuth2PasswordRequestForm` não é uma classe especial para **FastAPI** como é `OAuth2PasswordBearer`.
    
    `OAuth2PasswordBearer` faz com que **FastAPI** saiba que é um esquema de segurança. Portanto, é adicionado dessa forma ao OpenAPI.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Nov 12 16:23:57 UTC 2025
    - 10.3K bytes
    - Viewed (0)
  3. docs_src/security/tutorial006_py39.py

    from fastapi import Depends, FastAPI
    from fastapi.security import HTTPBasic, HTTPBasicCredentials
    
    app = FastAPI()
    
    security = HTTPBasic()
    
    
    @app.get("/users/me")
    def read_current_user(credentials: HTTPBasicCredentials = Depends(security)):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 321 bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. docs_src/custom_response/tutorial007_py39.py

    from fastapi import FastAPI
    from fastapi.responses import StreamingResponse
    
    app = FastAPI()
    
    
    async def fake_video_streamer():
        for i in range(10):
            yield b"some fake video bytes"
    
    
    @app.get("/")
    async def main():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 277 bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/cors.md

    ## `CORSMiddleware` verwenden { #use-corsmiddleware }
    
    Sie können das in Ihrer **FastAPI**-Anwendung mit der `CORSMiddleware` konfigurieren.
    
    * Importieren Sie `CORSMiddleware`.
    * Erstellen Sie eine Liste der erlaubten Origins (als Strings).
    * Fügen Sie es als „Middleware“ zu Ihrer **FastAPI**-Anwendung hinzu.
    
    Sie können auch angeben, ob Ihr Backend erlaubt:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  8. docs_src/security/tutorial001_an_py39.py

    from typing import Annotated
    
    from fastapi import Depends, FastAPI
    from fastapi.security import OAuth2PasswordBearer
    
    app = FastAPI()
    
    oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
    
    
    @app.get("/items/")
    async def read_items(token: Annotated[str, Depends(oauth2_scheme)]):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 309 bytes
    - Viewed (0)
  9. docs/uk/docs/tutorial/request-forms.md

    ```console
    $ pip install python-multipart
    ```
    
    ///
    
    ## Імпорт `Form`
    
    Імпортуйте `Form` з `fastapi`:
    
    {* ../../docs_src/request_forms/tutorial001_an_py39.py hl[3] *}
    
    ## Оголошення параметрів `Form`
    
    Створюйте параметри форми так само як Ви б створювали `Body` або `Query`:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Feb 28 14:13:50 UTC 2025
    - 4K bytes
    - Viewed (0)
  10. docs/es/docs/async.md

    Si estás trabajando con **FastAPI** no tienes que preocuparte por eso, porque esa "primera" función será tu *path operation function*, y FastAPI sabrá cómo hacer lo correcto.
    
    Pero si deseas usar `async` / `await` sin FastAPI, también puedes hacerlo.
    
    ### Escribe tu propio código async { #write-your-own-async-code }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 10:15:01 UTC 2025
    - 25.4K bytes
    - Viewed (0)
Back to top