Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 331 - 340 of 771 for depends (0.06 seconds)

  1. docs/en/docs/index.md

    To understand more about it, see the section [Benchmarks](https://fastapi.tiangolo.com/benchmarks/).
    
    ## Dependencies { #dependencies }
    
    FastAPI depends on Pydantic and Starlette.
    
    ### `standard` Dependencies { #standard-dependencies }
    
    When you install FastAPI with `pip install "fastapi[standard]"` it comes with the `standard` group of optional dependencies:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 07 09:29:03 GMT 2026
    - 21.4K bytes
    - Click Count (0)
  2. docs/uk/docs/advanced/security/oauth2-scopes.md

    /// info | Технічні деталі
    
    `Security` насправді є підкласом `Depends`, і має лише один додатковий параметр, який ми побачимо пізніше.
    
    Але використовуючи `Security` замість `Depends`, **FastAPI** знатиме, що можна оголошувати scopes безпеки, використовувати їх внутрішньо та документувати API через OpenAPI.
    
    Коли ви імпортуєте `Query`, `Path`, `Depends`, `Security` та інші з `fastapi`, це насправді функції, що повертають спеціальні класи.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:27:41 GMT 2026
    - 20.2K bytes
    - Click Count (0)
  3. docs/pt/docs/advanced/advanced-dependencies.md

    Na versão 0.121.0, o FastAPI adicionou suporte a `Depends(scope="function")` para dependências com `yield`.
    
    Usando `Depends(scope="function")`, o código de saída após o `yield` é executado logo depois que a *função de operação de rota* termina, antes de a response ser enviada de volta ao cliente.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 9.9K bytes
    - Click Count (0)
  4. docs/ko/docs/advanced/security/oauth2-scopes.md

    이를 위해 `fastapi`에서 `Security`를 import하여 사용합니다.
    
    `Security`는 (`Depends`처럼) 의존성을 선언하는 데 사용할 수 있지만, `Security`는 스코프(문자열) 목록을 받는 `scopes` 매개변수도 받습니다.
    
    이 경우, 의존성 함수 `get_current_active_user`를 `Security`에 전달합니다(`Depends`로 할 때와 같은 방식).
    
    하지만 스코프 `list`도 함께 전달합니다. 여기서는 스코프 하나만: `items`(더 많을 수도 있습니다).
    
    또한 의존성 함수 `get_current_active_user`는 `Depends`뿐 아니라 `Security`로도 하위 의존성을 선언할 수 있습니다. 자체 하위 의존성 함수(`get_current_user`)와 추가 스코프 요구사항을 선언합니다.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 15.7K bytes
    - Click Count (0)
  5. docs/tr/docs/tutorial/security/get-current-user.md

    {* ../../docs_src/security/tutorial002_an_py310.py hl[19:22,26:27] *}
    
    ## Mevcut kullanıcıyı enjekte edin { #inject-the-current-user }
    
    Artık *path operation* içinde `get_current_user` ile aynı `Depends` yaklaşımını kullanabiliriz:
    
    {* ../../docs_src/security/tutorial002_an_py310.py hl[31] *}
    
    `current_user` tipini Pydantic `User` modeli olarak belirttiğimize dikkat edin.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 13 12:41:38 GMT 2026
    - 4.4K bytes
    - Click Count (0)
  6. tests/test_generic_parameterless_depends.py

    from typing import Annotated, TypeVar
    
    from fastapi import Depends, FastAPI
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    app = FastAPI()
    
    T = TypeVar("T")
    
    Dep = Annotated[T, Depends()]
    
    
    class A:
        pass
    
    
    class B:
        pass
    
    
    @app.get("/a")
    async def a(dep: Dep[A]):
        return {"cls": dep.__class__.__name__}
    
    
    @app.get("/b")
    async def b(dep: Dep[B]):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 2K bytes
    - Click Count (0)
  7. docs/uk/docs/advanced/advanced-dependencies.md

    У версії 0.121.0 **FastAPI** додано підтримку `Depends(scope="function")` для залежностей з `yield`.
    
    З `Depends(scope="function")` завершальний код після `yield` виконується одразу після завершення *функції операції шляху*, до того як відповідь буде надіслана клієнту.
    
    А при використанні `Depends(scope="request")` (типове значення) завершальний код після `yield` виконується після відправлення відповіді.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:27:41 GMT 2026
    - 13.9K bytes
    - Click Count (0)
  8. docs/ru/docs/tutorial/security/get-current-user.md

    {* ../../docs_src/security/tutorial002_an_py310.py hl[19:22,26:27] *}
    
    ## Внедрить текущего пользователя { #inject-the-current-user }
    
    Теперь мы можем использовать тот же `Depends` с нашей `get_current_user` в *операции пути*:
    
    {* ../../docs_src/security/tutorial002_an_py310.py hl[31] *}
    
    Обратите внимание, что мы объявляем тип `current_user` как Pydantic-модель `User`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 19:57:34 GMT 2026
    - 6.9K bytes
    - Click Count (0)
  9. docs/de/docs/advanced/advanced-dependencies.md

    In Version 0.121.0 hat FastAPI Unterstützung für `Depends(scope="function")` für Abhängigkeiten mit `yield` hinzugefügt.
    
    Mit `Depends(scope="function")` wird der Exit-Code nach `yield` direkt nach dem Ende der *Pfadoperation-Funktion* ausgeführt, bevor die Response an den Client gesendet wird.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 10.3K bytes
    - Click Count (0)
  10. tests/test_exception_handlers.py

    import pytest
    from fastapi import Depends, FastAPI, HTTPException
    from fastapi.exceptions import RequestValidationError
    from fastapi.testclient import TestClient
    from starlette.responses import JSONResponse
    
    
    def http_exception_handler(request, exception):
        return JSONResponse({"exception": "http-exception"})
    
    
    def request_validation_exception_handler(request, exception):
        return JSONResponse({"exception": "request-validation"})
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Dec 03 22:37:12 GMT 2024
    - 2.4K bytes
    - Click Count (0)
Back to Top