pydiffx.dom.writer#

Writer for generating a DiffX file from DOM objects.

Classes

DiffXDOMWriter()

A writer for generating a DiffX file from DOM objects.

class pydiffx.dom.writer.DiffXDOMWriter#

Bases: object

A writer for generating a DiffX file from DOM objects.

This will write a DiffX object tree to a byte stream, such as a file, HTTP response, or memory-backed stream.

If constructing manually, one instance can be reused for multiple DiffX objects.

writer_cls#

The class to instantiate for writing to a stream.

Subclasses can set this if they need to use a more specialized writer.

Type

type

alias of DiffXWriter

write_stream(diffx, stream)#

Write a DiffX object to a stream.

Parameters
Raises

pydiffx.errors.BaseDiffXError – The DiffX contents could not be written. Details will be in the error message.