Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 105 for APIRouter (0.04 sec)

  1. docs/en/docs/reference/apirouter.md

    # `APIRouter` class
    
    Here's the reference information for the `APIRouter` class, with all its parameters, attributes and methods.
    
    You can import the `APIRouter` class directly from `fastapi`:
    
    ```python
    from fastapi import APIRouter
    ```
    
    ::: fastapi.APIRouter
        options:
            members:
                - websocket
                - include_router
                - get
                - put
                - post
                - delete
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 524 bytes
    - Viewed (0)
  2. docs/ru/docs/tutorial/bigger-applications.md

    В дальнейшем используйте `APIRouter` для объявления *эндпоинтов*, точно также, как вы используете класс `FastAPI`:
    
    {* ../../docs_src/bigger_applications/app_an_py39/routers/users.py hl[6,11,16] title["app/routers/users.py"] *}
    
    Вы можете думать об `APIRouter` как об "уменьшенной версии" класса FastAPI`.
    
    `APIRouter` поддерживает все те же самые опции.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Dec 11 21:25:03 UTC 2025
    - 30.4K bytes
    - Viewed (0)
  3. docs/de/docs/tutorial/bigger-applications.md

    Sie können die *Pfadoperationen* für dieses Modul mit `APIRouter` erstellen.
    
    ### `APIRouter` importieren { #import-apirouter }
    
    Sie importieren ihn und erstellen eine „Instanz“ auf die gleiche Weise wie mit der Klasse `FastAPI`:
    
    {* ../../docs_src/bigger_applications/app_an_py39/routers/users.py hl[1,3] title["app/routers/users.py"] *}
    
    ### *Pfadoperationen* mit `APIRouter` { #path-operations-with-apirouter }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 10 13:54:34 UTC 2025
    - 21.3K bytes
    - Viewed (0)
  4. docs/es/docs/tutorial/bigger-applications.md

    Puedes crear las *path operations* para ese módulo usando `APIRouter`.
    
    ### Importar `APIRouter` { #import-apirouter }
    
    Lo importas y creas una "instance" de la misma manera que lo harías con la clase `FastAPI`:
    
    {* ../../docs_src/bigger_applications/app_an_py39/routers/users.py hl[1,3] title["app/routers/users.py"] *}
    
    ### *Path operations* con `APIRouter` { #path-operations-with-apirouter }
    
    Y luego lo usas para declarar tus *path operations*.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 16:33:45 UTC 2025
    - 19.6K bytes
    - Viewed (0)
  5. docs/pt/docs/tutorial/bigger-applications.md

    Você pode criar as *operações de rotas* para esse módulo usando o `APIRouter`.
    
    ### Importe `APIRouter` { #import-apirouter }
    
    você o importa e cria uma "instância" da mesma maneira que faria com a classe `FastAPI`:
    
    {* ../../docs_src/bigger_applications/app_an_py39/routers/users.py hl[1,3] title["app/routers/users.py"] *}
    
    ### *Operações de Rota* com `APIRouter` { #path-operations-with-apirouter }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 20:32:40 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  6. tests/test_default_response_class_router.py

    from fastapi.responses import HTMLResponse, JSONResponse, PlainTextResponse
    from fastapi.testclient import TestClient
    
    
    class OverrideResponse(JSONResponse):
        media_type = "application/x-override"
    
    
    app = FastAPI()
    router_a = APIRouter()
    router_a_a = APIRouter()
    router_a_b_override = APIRouter()  # Overrides default class
    router_b_override = APIRouter()  # Overrides default class
    router_b_a = APIRouter()
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Mar 01 20:49:20 UTC 2020
    - 5K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/bigger-applications.md

    You can create the *path operations* for that module using `APIRouter`.
    
    ### Import `APIRouter` { #import-apirouter }
    
    You import it and create an "instance" the same way you would with the class `FastAPI`:
    
    {* ../../docs_src/bigger_applications/app_an_py39/routers/users.py hl[1,3] title["app/routers/users.py"] *}
    
    ### *Path operations* with `APIRouter` { #path-operations-with-apirouter }
    
    And then you use it to declare your *path operations*.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 10 08:55:32 UTC 2025
    - 18.6K bytes
    - Viewed (0)
  8. tests/test_additional_response_extra.py

    from fastapi import APIRouter, FastAPI
    from fastapi.testclient import TestClient
    
    router = APIRouter()
    
    sub_router = APIRouter()
    
    app = FastAPI()
    
    
    @sub_router.get("/")
    def read_item():
        return {"id": "foo"}
    
    
    router.include_router(sub_router, prefix="/items")
    
    app.include_router(router)
    
    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.get("/items/")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  9. cmd/bucket-handlers_test.go

    	if err != nil {
    		t.Fatalf("Test %s: Failed to create HTTP request for RemoveBucketHandler: <ERROR> %v", instanceType, err)
    	}
    	// Since `apiRouter` satisfies `http.Handler` it has a ServeHTTP to execute the logic of the handler.
    	// Call the ServeHTTP to execute the handler.
    	apiRouter.ServeHTTP(rec, req)
    	switch rec.Code {
    	case http.StatusOK, http.StatusCreated, http.StatusAccepted, http.StatusNoContent:
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Fri Aug 29 02:39:48 UTC 2025
    - 39.8K bytes
    - Viewed (0)
  10. cmd/object-handlers_test.go

    		}
    		// Since `apiRouter` satisfies `http.Handler` it has a ServeHTTP to execute the logic of the handler.
    		// Call the ServeHTTP to execute the handler,`func (api objectAPIHandlers) GetObjectHandler`  handles the request.
    		apiRouter.ServeHTTP(rec, req)
    
    		// Assert the response code with the expected status.
    Registered: Sun Dec 28 19:28:13 UTC 2025
    - Last Modified: Sun Sep 28 20:59:21 UTC 2025
    - 163.1K bytes
    - Viewed (0)
Back to top