Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 21 - 30 of 564 for Router (0.05 seconds)

  1. docs/pt/llm-prompt.md

    * path operation: operação de rota
    * path operation function: função de operação de rota
    * prefix: prefixo
    * request (as in HTTP request): request (do not change if it's already translated to requisição)
    * router (as in FastAPI's router): router (do not change if it's already translated to "roteador" or "roteadores")
    * response (as in HTTP response): response (do not change if it's already translated to resposta)
    * shutdown (of the app): encerramento
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Jan 16 12:27:02 GMT 2026
    - 3.9K bytes
    - Click Count (0)
  2. docs/en/docs/how-to/custom-request-and-route.md

    ## Custom `APIRoute` class in a router { #custom-apiroute-class-in-a-router }
    
    You can also set the `route_class` parameter of an `APIRouter`:
    
    {* ../../docs_src/custom_request_and_route/tutorial003_py310.py hl[26] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 4.4K bytes
    - Click Count (0)
  3. tests/test_security_oauth2_authorization_code_bearer_scopes_openapi.py

    )
    async def read_with_get_token():
        return {"message": "Admin Access"}
    
    
    router = APIRouter(dependencies=[Security(oauth2_scheme, scopes=["read"])])
    
    
    @router.get("/items/")
    async def read_items(token: str | None = Depends(oauth2_scheme)):
        return {"token": token}
    
    
    @router.post("/items/")
    async def create_item(
        token: str | None = Security(oauth2_scheme, scopes=["read", "write"]),
    ):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 6.6K bytes
    - Click Count (0)
  4. cmd/crossdomain-xml-handler_test.go

    	"testing"
    
    	"github.com/minio/mux"
    )
    
    // Test cross domain xml handler.
    func TestCrossXMLHandler(t *testing.T) {
    	// Server initialization.
    	router := mux.NewRouter().SkipClean(true).UseEncodedPath()
    	handler := setCrossDomainPolicyMiddleware(router)
    	srv := httptest.NewServer(handler)
    
    	resp, err := http.Get(srv.URL + crossDomainXMLEntity)
    	if err != nil {
    		t.Fatal(err)
    	}
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Sat Jul 08 14:31:42 GMT 2023
    - 1.3K bytes
    - Click Count (0)
  5. docs_src/bigger_applications/app_an_py310/routers/users.py

    from fastapi import APIRouter
    
    router = APIRouter()
    
    
    @router.get("/users/", tags=["users"])
    async def read_users():
        return [{"username": "Rick"}, {"username": "Morty"}]
    
    
    @router.get("/users/me", tags=["users"])
    async def read_user_me():
        return {"username": "fakecurrentuser"}
    
    
    @router.get("/users/{username}", tags=["users"])
    async def read_user(username: str):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 407 bytes
    - Click Count (0)
  6. docs/zh-hant/docs/advanced/openapi-callbacks.md

    ///
    
    ### 加入回呼 router { #add-the-callback-router }
    
    此時你已經在先前建立的回呼 router 中,擁有所需的回呼「路徑操作(們)」(也就是「外部開發者」應該在「外部 API」中實作的那些)。
    
    現在在「你的 API 的路徑操作裝飾器」中使用參數 `callbacks`,將該回呼 router 的屬性 `.routes`(實際上就是一個由路由/「路徑操作」所組成的 `list`)傳入:
    
    {* ../../docs_src/openapi_callbacks/tutorial001_py310.py hl[33] *}
    
    /// tip
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 7.5K bytes
    - Click Count (0)
  7. tests/test_modules_same_name_body/app/a.py

    from fastapi import APIRouter, Body
    
    router = APIRouter()
    
    
    @router.post("/compute")
    def compute(a: int = Body(), b: str = Body()):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 160 bytes
    - Click Count (0)
  8. tests/test_modules_same_name_body/app/b.py

    from fastapi import APIRouter, Body
    
    router = APIRouter()
    
    
    @router.post("/compute/")
    def compute(a: int = Body(), b: str = Body()):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 161 bytes
    - Click Count (0)
  9. docs_src/bigger_applications/app_an_py310/internal/admin.py

    from fastapi import APIRouter
    
    router = APIRouter()
    
    
    @router.post("/")
    async def update_admin():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 147 bytes
    - Click Count (0)
  10. docs_src/bigger_applications/app_an_py310/routers/items.py

    from ..dependencies import get_token_header
    
    router = APIRouter(
        prefix="/items",
        tags=["items"],
        dependencies=[Depends(get_token_header)],
        responses={404: {"description": "Not found"}},
    )
    
    
    fake_items_db = {"plumbus": {"name": "Plumbus"}, "gun": {"name": "Portal Gun"}}
    
    
    @router.get("/")
    async def read_items():
        return fake_items_db
    
    
    @router.get("/{item_id}")
    async def read_item(item_id: str):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 1011 bytes
    - Click Count (0)
Back to Top