sondra.help module

class sondra.help.RSTBuilder(fmt='rst', out=None, initial_heading_level=0)[source]

Bases: builtins.object

A simple builder for reStructuredText help.

Does not support all of RST by a long shot. However, it provides sufficient functionality to be useful for generating help from JSON.

HEADING_CHARS = "#=*+-~^`_:.'"
begin(title)[source]
begin_code(preface='')[source]
begin_list()[source]
begin_subheading(title)[source]
build()[source]
dedent()[source]
define(term, definition)[source]
end()[source]
end_code()[source]
end_list()[source]
end_lists()[source]
end_subheading()[source]
full_stop()[source]
html[source]
indent(amt=None)[source]
line(s='')[source]
odt[source]
rst[source]
sep(separator=' ')[source]
class sondra.help.SchemaHelpBuilder(schema, url='', fmt='rst', out=None, initial_heading_level=0)[source]

Bases: sondra.help.RSTBuilder

Builds help from a JSON-Schema as either HTML or reStructuredText source.

RESERVED_WORDS = {'dependencies', 'patternProperties', 'minProperties', 'id', 'additionalProperties', 'title', 'properties', 'name', 'description', 'required', 'type', 'maxProperties'}
build()[source]