Language Translators

Translators

Translator

class papermill.translators.Translator
classmethod assign(name, str_val)
classmethod codify(parameters)
classmethod comment(cmt_str)
classmethod translate(val)

Translate each of the standard json/yaml types to appropiate objects.

classmethod translate_bool(val)

Default behavior for translation

classmethod translate_dict(val)
classmethod translate_escaped_str(str_val)

Reusable by most interpreters

classmethod translate_float(val)

Default behavior for translation

classmethod translate_int(val)

Default behavior for translation

classmethod translate_list(val)
classmethod translate_none(val)

Default behavior for translation

classmethod translate_raw_str(val)

Reusable by most interpreters

classmethod translate_str(val)

Default behavior for translation

PapermillTranslators

class papermill.translators.PapermillTranslators

The holder which houses any translator registered with the system. This object is used in a singleton manner to save and load particular named Translator objects for reference externally.

find_translator(kernel_name, language)
register(language, translator)

Python

class papermill.translators.PythonTranslator
classmethod comment(cmt_str)
classmethod translate_bool(val)

Default behavior for translation

classmethod translate_dict(val)
classmethod translate_list(val)

R

class papermill.translators.RTranslator
classmethod assign(name, str_val)
classmethod comment(cmt_str)
classmethod translate_bool(val)

Default behavior for translation

classmethod translate_dict(val)
classmethod translate_list(val)
classmethod translate_none(val)

Default behavior for translation

Julia

class papermill.translators.JuliaTranslator
classmethod comment(cmt_str)
classmethod translate_dict(val)
classmethod translate_list(val)
classmethod translate_none(val)

Default behavior for translation

Scala

class papermill.translators.ScalaTranslator
classmethod assign(name, str_val)
classmethod comment(cmt_str)
classmethod translate_dict(val)

Translate dicts to scala Maps

classmethod translate_int(val)

Default behavior for translation

classmethod translate_list(val)

Translate list to scala Seq

Functions

papermill.translators.translate_parameters(kernel_name, language, parameters)