The cli.py module#

Summary#

create_package

Create Python package based on a XML documentation.

main

A Python wrapper to convert XML documentation into Python source code

version

Display current version.

package

Create a Python package from your XML documentation.

Description#

Command Line Interface for PyConverter-XML2Py.

Module detail#

cli.create_package(xml_path: pathlib.Path | None = None, target_path: pathlib.Path | None = None, template_path: pathlib.Path | None = None, custom_functions_path: pathlib.Path | None = None, run_black: bool = False, max_docstring_length: int = 100) None#

Create Python package based on a XML documentation.

Parameters:
xml_path: str or Path

Path to the directory that contains the XML documentation to convert.

target_path: str or Path, optional

Path to the directory where you want to create the autogenerated package. The default value is the current working directory.

template_path: str or Path, optional

Path for the template to use. If no path is provided, the default template is used. The default value is the _package directory accessible in the PyConverter-XML2Py GitHub repository.

custom_functions_path: str or Path, optional

Path to the directory that contains the functions that need to be customized. The default value is None.

run_black: bool, optional

Whether to run black CLI on the autogenerated package source code. The default value is False.

max_docstring_length: int, optional

Maximum length of the generated docstrings. The default is 100.

cli.main()#

A Python wrapper to convert XML documentation into Python source code with its related Sphinx documentation.

cli.version()#

Display current version.

cli.package(xml_path: pathlib.Path, func_path: pathlib.Path, targ_path: pathlib.Path, template_path: pathlib.Path, run_black: bool, max_length: int) None#

Create a Python package from your XML documentation.