JsonData class

class almapiwrapper.record.JsonData(content: Optional[Dict] = None, filepath: Optional[str] = None)

Bases: object

Simple class representing json data

Only very general methods are described here. Method to create, update or delete the data are at the record level.

Variables

content – json content of the object

Example

>>> from almapiwrapper.record import JsonData
>>> data = JsonData(filepath='path_to_some_json_file')
>>> print(data)

Will pretty print the json content.

Data can be changed in the content attribute.

XmlData class

class almapiwrapper.record.XmlData(content: Optional[bytes] = None, filepath: Optional[str] = None)

Bases: object

Simple class representing XML data

Only very general methods are described here. Method to create, update or delete the data are at the record level.

Variables

content – bytes with the xml data

parser: ClassVar[XMLParser] = <lxml.etree.XMLParser object>
sort_fields() None

Sort all the fields and subfields of the record.

Returns

None