Skip to main content
Build Status Coverage Status Documentation PyPI - Version

This is uTidylib, the Python wrapper for the HTML cleaning library named TidyLib. It supports both original Tidy <http://tidy.sf.net> and new HTML5 enabled Tidy <http://www.html-tidy.org/>.

The package is available on PyPI <https://pypi.org/project/uTidylib/>.

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 <https://utidylib.readthedocs.io/en/latest/>.

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"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title></title>
  </head>
  <body>
    Hello Tidy!
  </body>
</html>

Good luck!

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

utidylib-1.0.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

utidylib-1.0.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file utidylib-1.0.0.tar.gz.

File metadata

  • Download URL: utidylib-1.0.0.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for utidylib-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7c1281a02935cb40ac4e54a0e40761a4dce2afb968cf7575a05d62cf694e37c0
MD5 f28e8ab384026551de460353aaf88adc
BLAKE2b-256 013384bb6e8d4e6d8e94a35d1041c4c7f53b0b0ba3a27c249d0e53110b7b8bf3

See more details on using hashes here.

File details

Details for the file utidylib-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: utidylib-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for utidylib-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3407a5c85436ace4a034985c8b3d10cfc438e3c782d364d30b2fe6d9dfb4e802
MD5 0f1b754b023f3c74f967662ab3462f60
BLAKE2b-256 66900ca1669d33fbda91fbf38b627ec16d13d1476fbd12ab213ad402706e001d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

0.10

2 files

0.9

2 files

0.8

2 files

0.7

2 files

0.6

1 file

0.2

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page