On this page
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
- Internal data package: Intended for pydoc; the exact set of topic keys and text formatting may change between Python releases.
Linked from
- tuts/python3/stdlib_module
- tuts/python3/stdlib_module/annotationlib
- tuts/python3/stdlib_module/bdb
- tuts/python3/stdlib_module/cProfile
- tuts/python3/stdlib_module/doctest
- tuts/python3/stdlib_module/faulthandler
- tuts/python3/stdlib_module/pdb
- tuts/python3/stdlib_module/profile
- tuts/python3/stdlib_module/pstats
- tuts/python3/stdlib_module/pydoc
- tuts/python3/stdlib_module/pyexpat
- tuts/python3/stdlib_module/stdlib_module
- tuts/python3/stdlib_module/timeit
- tuts/python3/stdlib_module/trace
- tuts/python3/stdlib_module/tracemalloc
- tuts/python3/stdlib_module/typing
- tuts/python3/stdlib_module/unittest
Related notes
- tuts/python3/stdlib_module/annotationlib Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/doctest Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/pydoc Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/pyexpat Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/stdlib_module Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/typing Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/unittest Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/bdb links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/cProfile links to this page; shared tags: #stdlib