Skip to main content

Wrapper for HTML Tidy

Project description

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!

Project details


Download files

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

Source Distribution

uTidylib-0.10.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

uTidylib-0.10-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file uTidylib-0.10.tar.gz.

File metadata

  • Download URL: uTidylib-0.10.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for uTidylib-0.10.tar.gz
Algorithm Hash digest
SHA256 95fe538c6cd1ea08d7df99d56a5816cb0571a06038189c03518024064edee60f
MD5 c3d218dcffd2ca682c5120f0dc427ceb
BLAKE2b-256 603b7e5d9f84fc7abc031290b8c277ee55a7009f9f3f3c8e15ab8be76a01c266

See more details on using hashes here.

File details

Details for the file uTidylib-0.10-py3-none-any.whl.

File metadata

  • Download URL: uTidylib-0.10-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.8

File hashes

Hashes for uTidylib-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 672cd4d5ec28d5e3e4496c0e104569e4342ff32f9fd28b74871174fae66eee7c
MD5 51b28b010d473458c8174586235ff78e
BLAKE2b-256 c2e354156cd94f0c8b80c3a6432fdb49b0ff73458c6f815080d17c187b567cd7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page