Registry / data / pretext

pretext

JSON →
library2.38.3pypypiunverified

A Python package for authoring, building, and deploying PreTeXt projects. PreTeXt is an XML-based markup language for writing academic articles, textbooks, and other documents. Current version 2.38.3, requires Python >=3.10, <4.0. Roughly monthly releases.

pip install pretext
INSTALL
IMPORT
SIG · PRETEXT
P
pretext
datapythonv2.38.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PretextProject
from pretext import PretextProject
from pretext import PretextProject

Create a new PreTeXt project and build to HTML.

from pretext import PretextProject # Create a new project in the current directory project = PretextProject() project.setup("my-book", author="Your Name", source_dir="source") print(f"Project created at {project.path}") # Build to HTML from pretext import build def build_html(project_dir): build(project_dir, format="html") print("Build complete") build_html("./my-book")
pretext --version
Debug
Known issues
breakingPython 3.10+ required. Installation on Python 3.9 or older will fail.
fix
Upgrade to Python >=3.10.
affects: <=2.38.3
gotchaImporting submodules (e.g., `pretext.build`) directly is discouraged; use `pretext.build(project_dir, format=...)` via the top-level API. Direct imports may break without notice.
fix
Always import from the top-level `pretext` package. E.g., import `pretext` and call `pretext.build(...)`.
affects: >=2.0.0
Upgrade
Version history
2.38.3latest on PyPI · released Apr 21, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
pretext — pip install pretext · libregistry