docs

classdocs.cls_sig

Generate a class signature string.

1
2
3
4
class cls_sig:
    """Generate a class signature string."""
    n: Node  # the node to generate signature for
    dataclass = False  # whether to include @dataclass decorator
funcdocs.fn_sig

Generate a function signature string with inline parameter documentation.

1
2
3
4
5
def fn_sig(
    n: Node,  # the node to generate signature for
    is_async=False  # async ?
) -> str:
    """Generate a function signature string with inline parameter documentation."""
classdocs.sig

Generate a signature string for a class or function node.

1
2
3
class sig:
    """Generate a signature string for a class or function node."""
    n: Node  # the node to generate signature for
funcdocs.write_llms

Write API signatures to llms.txt file for LLM consumption.

1
2
3
4
5
6
def write_llms(
    meta: dict,  # project metadata from pyproject.toml
    nodes: list,  # list of Node objects to document
    root: str='.'  # root directory containing pyproject.toml
):
    """Write API signatures to llms.txt file for LLM consumption."""
funcdocs.html_preview

Display FT components in an IFrame

1
2
3
4
5
def html_preview(
    width='100%',
    height='300px'
):
    """Display FT components in an IFrame"""