code-node¶
Point it at a Python project and it draws what one function does when it runs: the functions it calls, and the AWS
services, HTTP endpoints and environment variables those reach. It reads the source with ast, so nothing is
imported or run.
pip install code-node-graph
code-node path/to/your/repo
examples/orders-service in this repository, starting from its Lambda handler.
Select a highlighted line to see the path it takes, or point at a box.The page¶
The graph is one of two tabs on an HTML page. The other walks through each call step by step. It's one file that works offline, and everything on it but opening a box's hidden calls works without JavaScript.

Running it¶
$ code-node examples/orders-service --list
1 entry point in examples/orders-service:
1. orders.handler.lambda_handler a Lambda handler (event, context) (orders/handler.py:30)
$ code-node examples/orders-service
orders.handler.lambda_handler: 8 functions, 4 AWS calls
With no arguments it looks for places your code starts: console scripts, Lambda handlers, FastAPI, Flask and Django routes,
Typer commands and if __name__ == "__main__": blocks. If it finds more than one, it asks. code-node --serve keeps
the page open and redraws it each time you save a file.
Start has every option. Read the map explains the boxes and colours.
What it won't do¶
It never imports your modules, runs them, or calls AWS, and nothing leaves your machine. To name AWS operations, it reads botocore's service files from disk.
Some calls can't be known without running the code, like a function picked out of a dict or a client a library hands back. Those are left off the graph, and the page says where it stopped following.