Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 31 - 40 of 57 for include_router (0.27 seconds)

  1. docs_src/graphql_/tutorial001_py310.py

        @strawberry.field
        def user(self) -> User:
            return User(name="Patrick", age=100)
    
    
    schema = strawberry.Schema(query=Query)
    
    
    graphql_app = GraphQLRouter(schema)
    
    app = FastAPI()
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 424 bytes
    - Click Count (0)
  2. docs/fr/docs/tutorial/bigger-applications.md

    /// info
    
    `users.router` contient le `APIRouter` à l'intérieur du fichier `app/routers/users.py`.
    
    Et `items.router` contient le `APIRouter` à l'intérieur du fichier `app/routers/items.py`.
    
    ///
    
    Avec `app.include_router()`, nous pouvons ajouter chaque `APIRouter` à l'application principale `FastAPI`.
    
    Cela inclura toutes les routes de ce routeur comme faisant partie de l'application.
    
    /// note | Détails techniques
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 21.4K bytes
    - Click Count (0)
  3. docs/es/docs/tutorial/bigger-applications.md

    /// info | Información
    
    `users.router` contiene el `APIRouter` dentro del archivo `app/routers/users.py`.
    
    Y `items.router` contiene el `APIRouter` dentro del archivo `app/routers/items.py`.
    
    ///
    
    Con `app.include_router()` podemos agregar cada `APIRouter` a la aplicación principal de `FastAPI`.
    
    Incluirá todas las rutas de ese router como parte de ella.
    
    /// note | Detalles Técnicos
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 20.2K bytes
    - Click Count (0)
  4. docs/pt/docs/tutorial/bigger-applications.md

    /// info | Informação
    
    `users.router` contém o `APIRouter` dentro do arquivo `app/routers/users.py`.
    
    E `items.router` contém o `APIRouter` dentro do arquivo `app/routers/items.py`.
    
    ///
    
    Com `app.include_router()` podemos adicionar cada `APIRouter` ao aplicativo principal `FastAPI`.
    
    Ele incluirá todas as rotas daquele router como parte dele.
    
    /// note | Detalhes Técnicos
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 20.3K bytes
    - Click Count (0)
  5. tests/test_router_prefix_with_template.py

    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    router = APIRouter()
    
    
    @router.get("/users/{id}")
    def read_user(segment: str, id: str):
        return {"segment": segment, "id": id}
    
    
    app.include_router(router, prefix="/{segment}")
    
    
    client = TestClient(app)
    
    
    def test_get():
        response = client.get("/seg/users/foo")
        assert response.status_code == 200, response.text
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Apr 08 04:37:38 GMT 2020
    - 484 bytes
    - Click Count (0)
  6. tests/test_custom_middleware_exception.py

            await self.app(scope, wrapper, send)
    
    
    @router.post("/middleware")
    def run_middleware(file: UploadFile = File(..., description="Big File")):
        return {"message": "OK"}
    
    
    app.include_router(router)
    app.add_middleware(ContentSizeLimitMiddleware, max_content_size=2**8)
    
    
    client = TestClient(app)
    
    
    def test_custom_middleware_exception(tmp_path: Path):
        default_pydantic_max_size = 2**16
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 2.8K bytes
    - Click Count (0)
  7. docs/uk/docs/advanced/testing-dependencies.md

    Оригінальна залежність може використовуватися у функції операції шляху, у декораторі операції шляху (коли ви не використовуєте повернуте значення), у виклику `.include_router()` тощо.
    
    FastAPI усе одно зможе її переписати.
    
    ///
    
    Потім ви можете скинути переписування (видалити їх), встановивши для `app.dependency_overrides` порожній `dict`:
    
    ```Python
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Feb 14 08:43:14 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  8. docs/ko/docs/tutorial/bigger-applications.md

    /// info | 정보
    
    `users.router`는 `app/routers/users.py` 파일 안의 `APIRouter`를 담고 있습니다.
    
    `items.router`는 `app/routers/items.py` 파일 안의 `APIRouter`를 담고 있습니다.
    
    ///
    
    `app.include_router()`로 각 `APIRouter`를 메인 `FastAPI` 애플리케이션에 추가할 수 있습니다.
    
    그 router의 모든 route가 애플리케이션의 일부로 포함됩니다.
    
    /// note | 기술 세부사항
    
    내부적으로는 `APIRouter`에 선언된 각 *path operation*마다 *path operation*을 실제로 생성합니다.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 21.5K bytes
    - Click Count (0)
  9. docs/tr/docs/advanced/testing-dependencies.md

    Orijinal dependency bir *path operation function* içinde, bir *path operation decorator* içinde (return value kullanmadığınız durumlarda), bir `.include_router()` çağrısında, vb. kullanılıyor olabilir.
    
    FastAPI yine de onu override edebilir.
    
    ///
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 13 12:41:38 GMT 2026
    - 2.7K bytes
    - Click Count (0)
  10. docs/ru/docs/advanced/testing-dependencies.md

    Исходная зависимость может использоваться в функции-обработчике пути, в декораторе операции пути (когда вы не используете возвращаемое значение), в вызове `.include_router()` и т.д.
    
    FastAPI всё равно сможет её переопределить.
    
    ///
    
    Затем вы можете сбросить переопределения (удалить их), установив `app.dependency_overrides` в пустой `dict`:
    
    ```Python
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Sep 30 11:37:11 GMT 2025
    - 4.3K bytes
    - Click Count (0)
Back to Top