Skip to content
Go to file
This branch is 200 commits ahead of xdissent:master.

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time



Build Status Coverage Status Documentation

This is fork of uTidylib with permission with original author. Originally it incorporated patches from Debian and other distributions, now it also brings compatibility with recent html-tidy versions and works with Python 3.

The package is available on PyPI <>.

This is uTidylib, the Python wrapper for the HTML cleaning library named TidyLib. It supports both original Tidy <> and new HTML5 enabled Tidy <>.

Once installed, there are two ways to get help. The simplest is:

$ python
>>> import tidy
>>> help(tidy)
. . .

Then, of course, there's the API documentation, which is available at <>.

10 Second Tutorial

>>> import tidy
>>> print(tidy.parseString(
...     '<Html>Hello Tidy!',
...     output_xhtml=1, add_xml_decl=1, indent=1, tidy_mark=0,
...     doctype='transitional'
... ))
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="">
    Hello Tidy!

Good luck!

You can’t perform that action at this time.