SIGN IN SIGN UP

Docs/python: Use docstring standard (#2058)

## What?
Change the doxygen-like docstrings into standard python docstrings.

## Why?

The Python API currently places documentation strings before classes and
functions and uses tags such as `@brief`, `@args`, `@param`, and
`@return`. In that position they are ordinary, discarded string
expressions rather than Python docstrings, so Python documentation tools
do not pick them up; a Python docstring must be the first statement
inside the class or function it documents.

This PR standardizes the Python API on PEP 257 docstrings with
Google-style structured sections, following the format now documented in
`CONTRIBUTING.md`. First commits updates `CONTRIBUTING.md`, the second
commit moves the docstrings into that format. No text changes are done
in this PR.

I have already experimented with automatic documentation generation for
Fern (docs.nvidia.com) and this format is supported by a python docs
generator (handsdown, see comment
https://github.com/ai-dynamo/nixl/pull/1946#issuecomment-5216012849 ). I
couldn't find any that would process the current format.

Note, due to the dynamic imports in `nixl.py` the docstrings still do
not show up in VSCode (and i presume other IDEs) autocomplete, but if
the dynamic import is replaced with a static one, they do show up in the
autocomplete. Nevertheless, for interactive documentation query using
the `.__doc__` property, these strings now show up:

## Verification

Before:

```bash
$ cd /workspace/nixl-upstream
$ LD_LIBRARY_PATH="$PWD/.venv/lib" .venv/bin/python3 -c 'import nixl; print(nixl.nixl_agent_config.__doc__)'
None
```

After:

```bash
$ cd /workspace/nixl-pydoc-std
$ LD_LIBRARY_PATH="$PWD/.venv/lib" .venv/bin/python3 -c 'import nixl; print(nixl.nixl_agent_config.__doc__)'
Configuration class for NIXL agent.

    Args:
        enable_prog_thread: Whether to enable the progress thread, if available.
        enable_listen_thread: Whether to enable the listener thread for metadata communication.
        listen_port: Specify the port for the listener thread to listen on.
        capture_telemetry: Whether to enable telemetry capture.
        num_threads: Specify number of threads for the supported multi-threaded backends.
        backends: List of backend names for agent to initialize.
            Default is UCX, other backends can be added to the list, or after
            agent creation, can be initialized with create_backend.
        sync_mode: Thread synchronization mode to use for the agent.
            If None, sync_mode is set based on the enable_listen flag.
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Added Python docstring standards covering PEP 257, Google-style
formatting, placement, summaries, and examples.
* Improved API documentation across Python interfaces with consistent,
clearer docstrings.
  * No runtime behavior or public API signatures were changed.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Signed-off-by: Lukas Humbel <lhumbel@nvidia.com>
L
Lukas Humbel committed
3e26bfd4de360f7ae766f09525d29df78ba1cd13
Parent: 148eeeb
Committed by GitHub <noreply@github.com> on 8/11/2026, 4:00:42 PM