UTIDYLIB(1) uTidylib UTIDYLIB(1) (NAME) utidylib - uTidylib Tidy. TidyLib . HTML Tidy tidy . tidy . (-) (_) parse parseString . : >>> import tidy >>> from __future__ import print_function >>> print(tidy.parseString( ... 'Hello Tidy!', ... output_xhtml=1, add_xml_decl=1, indent=1, tidy_mark=0, ... doctype='transitional' ... )) Hello Tidy! newline output_encoding tidy.parseString('foo', newline=2) tidy.parseString('foo', newline='CR') . TidyLib (document-tree traversal) DOM . ( Twisted twisted.web.microdom ). tidy.parse(filename: str, **kwargs: OPTION_TYPE) -> Document filename HTML. . o kwargs -- TidyLib . o filename -- Document tidy.parseString(text: bytes | str, **kwargs: OPTION_TYPE) -> Document text HTML. . o kwargs -- TidyLib . o text -- Document class tidy.Document(options: OPTION_DICT_TYPE) Document parseString() parse() . get_errors() -> list[ReportItem] ReportItem. gettext() -> str (Unicode) tidy. getvalue() -> bytes tidy . write(stream: BinaryIO) -> None stream -- . (stream). class tidy.ReportItem(err: str) tidy . col: int | None ( None ) err: str tidy full_severity: str line: int | None ( None ) message: str severity: str D W E C exception tidy.TidyLibError Tidy. exception tidy.InvalidOptionError . exception tidy.OptionArgError . uTidylib HTML tidy . <> . uTidylib : pip install uTidylib GitHub : <>. pytest : pytest tidy : make -C docs html Sphinx . API docs/_build/html/ . MIT (c) 2003 Cory Dodt <> (c) 2014-2018 Michal Cihar <> ("") / : . " " . . 1.0.0 o . o Python. o Homebrew. o Python 3.7. o Python 3.12. o (type hints). o . o CleanAndRepair (parsing). o char_encoding. 0.9 o Python 3.6. o Python 3.10 3.11. o html-tidy 5.8.0. o TIDY_LIBRARY_FULL_PATH. o getTidyVersion libtidy. 0.8 o . o 0.7. 0.7 o Python 2. 0.6 o PyPI. 0.5 o Debian libtidy5deb1. 0.4 o html-tidy 5.6.0. o Python 3. 0.3 o . o Debian. o ( 64-bit). o . o . o . o HTML 5 tidy. (fork) uTidylib . Debian html-tidy Python 3 . . o <> o <> o <> uTidylib (COPYRIGHT) uTidylib 1.0 January 9, 2026 UTIDYLIB(1)