betty.extension.http_api_doc package - Betty documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.extension.http_api_doc package

## Module contents

Integrate Betty with ReDoc.

class betty.extension.http_api_doc.HttpApiDoc

  Bases: `UserFacingExtension`, `WebpackEntryPointProvider`

  Provide user-friendly HTTP API documentation.

  Parameters:

    - app (`betty.app.App`)

    - args (`typing.Any`)

    - kwargs (`typing.Any`)

  classmethod assets_directory_path() → pathlib.Path

    Return the path on disk where the extension’s assets are located.

    This may be anywhere in your Python package.

    Return type:

      `pathlib.Path`

  classmethod depends_on() → set[type[betty.app.extension.Extension]]

    The extensions this one depends on, and comes after.

    Return type:

      `set`[`type`[`betty.app.extension.Extension`]]

  classmethod description() → betty.locale.Str

    Get the human-readable extension description.

    Return type:

      `betty.locale.Str`

  classmethod label() → betty.locale.Str

    Get the human-readable extension label.

    Return type:

      `betty.locale.Str`

  classmethod name() → str

    The machine name.

    Return type:

      `str`

  webpack_entry_point_cache_keys() → collections.abc.Sequence[str]

    Get the keys that make a Webpack build for this provider unique.

    Providers that can be cached regardless may `return ()`.

    Return type:

      `collections.abc.Sequence`[`str`]

  classmethod webpack_entry_point_directory_path() → pathlib.Path

    Get the path to the directory with the entry point assets.

    The directory must include at least a `package.json` and `main.ts`.

    Return type:

      `pathlib.Path`