On this page
  1. pydoc_data
  2. Import
  3. Overview
  4. Quick Start
  5. Implementation Walkthrough
  6. 1. Listing Built-In help() Topics
  7. Gotchas & Boundaries

pydoc_data

Prev: pydoc | Up: stdlib_module | Next: pyexpat
Rel: typing, annotationlib, pydoc, doctest, unittest
Ref: docs.python.org — pydoc_data
Tags: #public #python3 #stdlib


Import

import pydoc_data

Overview

Internal data package used by pydoc and the built-in help() system to store Python's offline topic documentation (pydoc_data.topics.topics) and CSS stylesheets. You rarely import pydoc_data directly unless you are building a custom offline help viewer or documentation indexer.

Quick Start

from pydoc_data import topics

assert "ASSERTION" in topics.topics
assert "assert" in topics.topics["ASSERTION"].lower()

Implementation Walkthrough

1. Listing Built-In help() Topics

pydoc_data.topics.topics is a dictionary mapping uppercase topic keys (like "LISTS", "DECORATORS", "ASYNC") to the plain-text reference pages displayed when you run help("DECORATORS") in the REPL.

Gotchas & Boundaries

Linked from

Related notes