The documentation of the docconvert only describes the usage within the CLI.
When using this module from within a Python file, we can use the sys module to use it as a CLI argument, just as instructed in the documentation.
However, hacking into the undocumented territory, we can instantiate a configuration type and use the module as any pip module.
import docconvert
config = docconvert.configuration.DocconvertConfiguration()
config.update_from_json(filepath="conf.json")
docconvert.core.convert_file(
filepath="dog.py",
config=config,
in_place=True,
)
This works, and I think it should be documented.