The docs site now publishes the Python reference generated from this repository's main branch (https://lightpanda.io/docs/reference/python-api, built by the docs repo's python-reference workflow), and the hand-written reference page is being retired. Two pieces of information that page carried cannot be derived from the package today:
-
Return shapes. Every generated method in lightpanda/_methods.py is annotated -> Any, so the reference cannot say whether a call returns text, parsed JSON (dict/list), or bytes. The retired page had a Returns column for this. Options: have scripts/generate_methods.py emit narrower annotations where the tool schema makes the shape known, or state the return shape in the docstrings taken from the tool descriptions.
-
Session conventions. Keyword-only arguments, snake_case names derived from the browser's action names, the selector / backend_node_id pair where one is required and selector wins, Session.call as the escape hatch with the browser's own names, and ToolError on failure. This is currently a fixed paragraph in the docs generator; it belongs in the Session class docstring so it also shows up in IDE hover text and stays next to the code it describes.
The docs site now publishes the Python reference generated from this repository's
mainbranch (https://lightpanda.io/docs/reference/python-api, built by the docs repo'spython-referenceworkflow), and the hand-written reference page is being retired. Two pieces of information that page carried cannot be derived from the package today:Return shapes. Every generated method in
lightpanda/_methods.pyis annotated-> Any, so the reference cannot say whether a call returns text, parsed JSON (dict/list), orbytes. The retired page had a Returns column for this. Options: havescripts/generate_methods.pyemit narrower annotations where the tool schema makes the shape known, or state the return shape in the docstrings taken from the tool descriptions.Session conventions. Keyword-only arguments, snake_case names derived from the browser's action names, the
selector/backend_node_idpair where one is required andselectorwins,Session.callas the escape hatch with the browser's own names, andToolErroron failure. This is currently a fixed paragraph in the docs generator; it belongs in theSessionclass docstring so it also shows up in IDE hover text and stays next to the code it describes.