SnakeBridge.Docs (SnakeBridge v0.16.0)

Copy Markdown View Source

On-demand documentation fetching with optional caching.

Summary

Functions

Builds an ExDoc groups_for_modules keyword list using the SnakeBridge manifest.

Builds an ExDoc nest_modules_by_prefix list using the SnakeBridge manifest.

Functions

get(module, function)

@spec get(module(), atom() | String.t()) :: String.t()

groups_for_modules(opts \\ [])

@spec groups_for_modules(keyword()) :: [{String.t(), [module()]}]

Builds an ExDoc groups_for_modules keyword list using the SnakeBridge manifest.

This keeps HexDocs navigation aligned with Python package paths, while remaining purely an Elixir configuration concern.

Options

  • :config - SnakeBridge.Config struct (defaults to SnakeBridge.Config.load/0)
  • :manifest - manifest map (defaults to SnakeBridge.Manifest.load/1)
  • :depth - group depth beyond the library root (:full or non-negative integer, default: 1)
  • :libraries - list of library names to include (atoms or strings)
  • :include_functions - include module functions (default: true)
  • :include_classes - include class modules (default: true)

nest_modules_by_prefix(opts \\ [])

@spec nest_modules_by_prefix(keyword()) :: [module()]

Builds an ExDoc nest_modules_by_prefix list using the SnakeBridge manifest.

This keeps the navigation tree aligned with generated Python packages.

Options

search(module, query)

@spec search(module(), String.t()) :: list()