Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 454 for Gorter (0.2 sec)

  1. 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()):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 161 bytes
    - Viewed (0)
  2. cni/pkg/nodeagent/healthServer_test.go

    	"istio.io/istio/cni/pkg/constants"
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestServer(t *testing.T) {
    	router := http.NewServeMux()
    	installReady, watchReady := initRouter(router)
    
    	assert.Equal(t, installReady.Load(), false)
    	assert.Equal(t, watchReady.Load(), false)
    
    	server := httptest.NewServer(router)
    	defer server.Close()
    
    	makeReq(t, server.URL, constants.LivenessEndpoint, http.StatusOK)
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Jan 26 20:34:28 GMT 2024
    - 2K bytes
    - Viewed (0)
  3. tests/test_sub_callbacks.py

        ok: bool
    
    
    invoices_callback_router = APIRouter()
    
    
    @invoices_callback_router.post(
        "{$callback_url}/invoices/{$request.body.id}", response_model=InvoiceEventReceived
    )
    def invoice_notification(body: InvoiceEvent):
        pass  # pragma: nocover
    
    
    class Event(BaseModel):
        name: str
        total: float
    
    
    events_callback_router = APIRouter()
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  4. docs/de/docs/deployment/cloud.md

    * <a href="https://docs.porter.run/language-specific-guides/fastapi" class="external-link" target="_blank">Porter</a>
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:30:18 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  5. docs/en/data/sponsors.yml

        title: "Build, run and scale your apps on a modern, reliable, and secure PaaS."
        img: https://fastapi.tiangolo.com/img/sponsors/platform-sh.png
      - url: https://www.porter.run
        title: Deploy FastAPI on AWS with a few clicks
        img: https://fastapi.tiangolo.com/img/sponsors/porter.png
      - url: https://bump.sh/fastapi?utm_source=fastapi&utm_medium=referral&utm_campaign=sponsor
        title: Automate FastAPI documentation generation with Bump.sh
    Others
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Mar 25 23:10:11 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  6. tests/test_empty_router.py

    import pytest
    from fastapi import APIRouter, FastAPI
    from fastapi.exceptions import FastAPIError
    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    router = APIRouter()
    
    
    @router.get("")
    def get_empty():
        return ["OK"]
    
    
    app.include_router(router, prefix="/prefix")
    
    
    client = TestClient(app)
    
    
    def test_use_empty():
        with client:
            response = client.get("/prefix")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 22:37:34 GMT 2023
    - 805 bytes
    - Viewed (0)
  7. tests/test_router_events.py

        @sub_router.on_event("shutdown")
        def sub_router_shutdown() -> None:
            state.sub_router_shutdown = True
    
        router.include_router(sub_router)
        app.include_router(router)
    
        assert state.app_startup is False
        assert state.router_startup is False
        assert state.sub_router_startup is False
        assert state.app_shutdown is False
        assert state.router_shutdown is False
        assert state.sub_router_shutdown is False
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  8. tests/test_custom_route_class.py

        x_type = "C"
    
    
    router_a = APIRouter(route_class=APIRouteA)
    router_b = APIRouter(route_class=APIRouteB)
    router_c = APIRouter(route_class=APIRouteC)
    
    
    @router_a.get("/")
    def get_a():
        return {"msg": "A"}
    
    
    @router_b.get("/")
    def get_b():
        return {"msg": "B"}
    
    
    @router_c.get("/")
    def get_c():
        return {"msg": "C"}
    
    
    router_b.include_router(router=router_c, prefix="/c")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  9. tests/test_ws_dependencies.py

    
    def create_dependency(name: str):
        def fun(deps: DepList):
            deps.append(name)
    
        return Depends(fun)
    
    
    router = APIRouter(dependencies=[create_dependency("router")])
    prefix_router = APIRouter(dependencies=[create_dependency("prefix_router")])
    app = FastAPI(dependencies=[create_dependency("app")])
    
    
    @app.websocket("/", dependencies=[create_dependency("index")])
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 20:35:39 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  10. tests/test_dependency_overrides.py

    
    @router.get("/router-depends/")
    async def router_depends(commons: dict = Depends(common_parameters)):
        return {"in": "router-depends", "params": commons}
    
    
    @router.get("/router-decorator-depends/", dependencies=[Depends(common_parameters)])
    async def router_decorator_depends():
        return {"in": "router-decorator-depends"}
    
    
    app.include_router(router)
    
    client = TestClient(app)
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 15.4K bytes
    - Viewed (0)
Back to top