Python usage¶
Classes¶
differently supports difference visualisations through a library of classes:
StringDifferently
visualises the differences between stringsTextDifferently
visualises the differences between multi-line text bodiesListDifferently
visualises the differences between lists of stringsJsonDifferently
visualises the differences between objects as JSONYamlDifferently
visualises the differences between objects as YAML
Rendering¶
A difference can be visualised by casting any class instance to a string (i.e. str(...)
).
If you want to avoid string manipulation, you can render directly to any string IO stream via each class’s .render()
function.