Provides the base report model
This module defines a class representing the basic report data model from which all data models should inherit (or at least implement similar functionality). Data models store unserialized data generated by generators during the report serialization process.
Bases: _abcoll.MutableMapping
A Report Data Model
A report data model contains data generated by some generator method or class. Data may be read or written using dictionary-style access, and may be read (but not written) using object-member-style access. Additionally, a data model may have an associated view. This view is used to serialize the model when str() is called on the model. An appropriate object for a view is callable with a single parameter: the model to be serialized.
Parameters: |
|
---|
Set the current view type
This method attempts to set the current view type for this model and all submodels by calling itself recursively on all values (and ignoring the ones that are not themselves models)
Parameters: | tp – the type of the view (‘text’, ‘json’, ‘xml’, etc) |
---|