asyncio.capture_call_graph
Prev: asyncio.CancelledError | Up: asyncio | Next: asyncio.Condition
Rel: asyncio.AbstractEventLoop, asyncio.AbstractServer, asyncio.all_tasks, asyncio.as_completed
Ref: docs.python.org — asyncio.capture_call_graph
Tags: #public #python3 #stdlib #asyncio
Import
import asyncio
from asyncio import capture_call_graph
Signature & Overview
asyncio.capture_call_graph(future: _asyncio.Future | None = None, /, *, depth: int = 1, limit: int | None = None) -> asyncio.graph.FutureCallGraph | None
Capture the async call graph for the current task or the provided Future.
Usage
import asyncio
async def main():
graph = asyncio.capture_call_graph()
assert graph is not None
asyncio.run(main())
Gotchas
- Requires Python 3.14+: Captures the live async call graph for the current or specified task.
REPL Inspect
from asyncio import capture_call_graph
help(capture_call_graph)
Linked from
Related notes
- tuts/python3/stdlib_module/asyncio/CancelledError Linked here; links to this page; shared tags: #asyncio, #stdlib
- tuts/python3/stdlib_module/asyncio/Condition Linked here; links to this page; shared tags: #asyncio, #stdlib
- tuts/python3/stdlib_module/asyncio Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/asyncio/AbstractEventLoop Linked here; shared tags: #asyncio, #stdlib
- tuts/python3/stdlib_module/asyncio/AbstractServer Linked here; shared tags: #asyncio, #stdlib
- tuts/python3/stdlib_module/asyncio/all_tasks Linked here; shared tags: #asyncio, #stdlib
- tuts/python3/stdlib_module/asyncio/as_completed Linked here; shared tags: #asyncio, #stdlib
- tuts/python3/stdlib_module/asyncio/Barrier shared tags: #asyncio, #stdlib
- tuts/python3/stdlib_module/asyncio/BaseEventLoop shared tags: #asyncio, #stdlib
- tuts/python3/stdlib_module/asyncio/BaseProtocol shared tags: #asyncio, #stdlib