data_validation_framework.rst_tools

Some tools to generate RST files.

Classes

RstFile(file_path[, mode])

Class to help creating proper RST files.

class data_validation_framework.rst_tools.RstFile(file_path, mode='w')

Bases: object

Class to help creating proper RST files.

add(content, indent=0)

Add a single line to the internal buffer.

static bold(string)

Bold the given string.

clear()

Clear the internal buffer.

code_block(language='', indent=0)

Add a code-block directive to the internal buffer.

static emph(string)

Emph the given string.

exception(exception=None, indent=0, width=None)

Format and add an exception to the internal buffer.

get_buffer()

Get the internal buffer.

h1(text, indent=0)

Add a heading of level 1 to the internal buffer.

h10(text, indent=0)

Add a heading of level 10 to the internal buffer.

h11(text, indent=0)

Add a heading of level 11 to the internal buffer.

h12(text, indent=0)

Add a heading of level 12 to the internal buffer.

h2(text, indent=0)

Add a heading of level 2 to the internal buffer.

h3(text, indent=0)

Add a heading of level 3 to the internal buffer.

h4(text, indent=0)

Add a heading of level 4 to the internal buffer.

h5(text, indent=0)

Add a heading of level 5 to the internal buffer.

h6(text, indent=0)

Add a heading of level 6 to the internal buffer.

h7(text, indent=0)

Add a heading of level 7 to the internal buffer.

h8(text, indent=0)

Add a heading of level 8 to the internal buffer.

h9(text, indent=0)

Add a heading of level 9 to the internal buffer.

heading(text, char, indent=0)

Add a heading to the internal buffer.

heading_level(level, *args, **kwargs)

Add a heading of given level to the internal buffer.

Create a link from the given string and URL.

list(elements, width=None, indent=0, bullet='*')

Add list elements to the internal buffer.

newline(count=1)

Add an empty line to the internal buffer.

static pre(string)

Pre the given string.

title(text, indent=0, char='=')

Add a title to the internal buffer.

toc_tree(toc_type='toctree', maxdepth=None, numbered=True, indent=0)

Add a toc tree to the internal buffer.

write()

Write the internal buffer into the given file.