reportcompiler.plugins.source_parsers.python

python.py

This module includes the source parser using python.

Classes

class reportcompiler.plugins.source_parsers.python.PythonParser

Context generator for python scripts.

Inheritance

Inheritance diagram of PythonParser
generate_context(doc_param, data, metadata)

Generates the dictionary context.

Parameters:
  • doc_param (OrderedDict) – Document variable
  • data (pandas.DataFrame) – Pandas dataframe (or list of dataframes) with the specified input data
  • metadata (dict) – Document metadata (overriden by fragment metadata when specified)
Returns:

Dictionary with context for the template rendering stage

Return type:

dict

retrieve_fragment_metadata(doc_param, metadata)

Retrieves the metadata required to process the fragment.

Parameters:
  • doc_param (OrderedDict) – Document variable
  • metadata (dict) – Document metadata (overriden by fragment metadata when specified)
Returns:

Dictionary with metadata

Return type:

dict