skillfed

sgmllib3k

Py3k port of sgmllib.

sgmllib3k v1.0.0 10.1M downloads/30d#1,482 on PyPI
Permissive license BSD License Abandoned released

What it is and what it does

sgmllib3k is a minimal port of Python's old sgmllib module to Python 3, created by running 2to3 on the original code. It provides an event-driven SGML/HTML parser that works by subclassing and overriding handler methods for different document elements. The module was dropped from the stdlib because more robust alternatives exist, and the maintainer explicitly disclaims any intention to maintain this port.

The package has not been updated since its initial release on 2010-08-24 and is classified as abandoned. While it shows substantial download volume, this likely reflects transitive dependencies or legacy codebases still relying on it rather than active new adoption. The maintainer recommends finding another module for new projects.

Use it for:

  • Porting old Python 2 code that depended on sgmllib to Python 3 with minimal changes
  • Parsing legacy SGML documents in Python 3 when the original module is unavailable
  • Maintaining existing projects with hard dependencies on sgmllib3k that cannot be refactored

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Python 3 port of the deprecated stdlib sgmllib module for parsing SGML and HTML documents using an event-driven interface.

No. This package is abandoned (no updates since 2010-08-24, no maintenance commitment) and the maintainer explicitly recommends finding an alternative. Install only if you are maintaining legacy code with a hard dependency on sgmllib3k and cannot refactor to a maintained alternative.

Install

sgmllib3k on PyPI

pip

pip install sgmllib3k

uv

uv add sgmllib3k

poetry

poetry add sgmllib3k

Installing sgmllib3k

Before you install

High install friction: the package is abandoned (last release 2010-08-24, no activity for 5834 days) with no runtime dependencies. The maintainer explicitly states they do not intend to maintain it and recommend finding an alternative module.

License in practice

BSD License (permissive) imposes no significant restrictions on use or redistribution.

Quickstart

pip install sgmllib3k

from sgmllib3k import SGMLParser

class MyParser(SGMLParser):
    def handle_data(self, data):
        print(data)

parser = MyParser()
parser.feed('<html><body>Hello</body></html>')

No Python version constraint specified; compatibility with modern Python 3 versions is unverified.

Verify before relying

  • Whether sgmllib3k actually works on modern Python 3 versions or only those contemporary with 2010
  • Whether the 2to3 conversion was complete and handles Python 3 string/bytes distinctions correctly
  • What specific parsing tasks drive the 10088849 monthly downloads given the abandoned status

Package facts

License BSD License (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 5,834 days since the last release
First released
Downloads 10,088,849/month — #1,482 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: sgmllib3k-1.0.0.tar.gz

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3

Tags

sgml parser python 3html sgml parsingevent-driven html parsersgmllib3k replacementlegacy sgml parsing
deprecatedlegacy-compat

More HTML packages