Public API

Manage ReadTheDocs documentation with repo-helper.

Classes:

ReadTheDocsManager(token, target_repo[, …])

Subclass of repo_helper.core.RepoHelper with additional functions to update ReadTheDocs projects.

class ReadTheDocsManager(token, target_repo, managed_message="This file is managed by 'repo_helper'. Don't edit it directly.", *, colour=True)[source]

Bases: RepoHelper

Subclass of repo_helper.core.RepoHelper with additional functions to update ReadTheDocs projects.

Parameters
  • token (str) – The token to authenticate with the ReadTheDocs API.

  • target_repo (Union[str, Path, PathLike]) – The path to the root of the repository to manage files for.

  • managed_message – Message placed at the top of files to indicate that they are managed by repo_helper. Default "This file is managed by 'repo_helper'. Don't edit it directly.".

  • colour (Optional[bool]) – Whether to use coloured output. Default True.

Changed in version 0.2.3: Added the verbose and colour options.

Attributes:

colour

Whether to use coloured output.

Methods:

get_update_json()

Returns the body JSON used to update the project.

new()

Import this project into ReadTheDocs.

update()

Update this project on ReadTheDocs.

colour

Type:    Optional[bool]

Whether to use coloured output.

get_update_json()[source]

Returns the body JSON used to update the project.

Return type

Dict[str, Union[Dict[str, str], str]]

new()[source]

Import this project into ReadTheDocs.

Return type

Response

update()[source]

Update this project on ReadTheDocs.

Return type

Response