Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for bg (0.17 sec)

  1. tests/test_dependency_contextmanager.py

        assert state["context_a"] == "started a"
        raise OtherDependencyError()
    
    
    @app.get("/context_b_bg")
    async def get_context_b_bg(tasks: BackgroundTasks, state: dict = Depends(context_b)):
        async def bg(state: dict):
            state["bg"] = f"bg set - b: {state['context_b']} - a: {state['context_a']}"
    
        tasks.add_task(bg, state)
        return state
    
    
    # Sync versions
    
    
    @app.get("/sync_async")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 11.6K bytes
    - Viewed (0)
Back to top