datalad.cli.renderer

Render results in a terminal

class datalad.cli.renderer.DefaultOutputFormatter(missing=nagen())[source]

Bases: string.Formatter

A custom formatter for default output rendering using .format

get_value(key, args, kwds)[source]
class datalad.cli.renderer.DefaultOutputRenderer(format)[source]

Bases: object

A default renderer for .format’ed output line

datalad.cli.renderer.nadict(*items)[source]

A generator of default dictionary with the default nagen

class datalad.cli.renderer.nagen(missing='N/A')[source]

Bases: object

A helper to provide a desired missing value if no value is known

Usecases

  • could be used as a generator for defaultdict

  • since it returns itself upon getitem, should work even for complex nested dictionaries/lists .format templates