$npx skillfedfor your agent

PyLaTeX

A Python library for creating LaTeX files and snippets

With conditionsPyPI MarkupReleased Oct 2023665.6K downloads / moMITSource build

Decision gist · record as of 2026-08-14

sdist only — PyLaTeX-1.4.2.tar.gz · builds from source
v1.4.2 · released 2023-10-19

Yes, if you need to generate LaTeX or PDF documents from Python and are comfortable installing and maintaining a LaTeX processor on your system. The package is stable and permissively licensed, but maintenance is dormant (last release 2023-10-19); use it for established workflows rather than as a foundation for new, heavily customized projects. High install friction due to external LaTeX dependencies is the main trade-off.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • A LaTeX processor (e.g., texlive-latex-base, texlive-pictures, texlive-science, latexmk) must be installed on the system before use.
  • Installation requires a LaTeX processor (texlive or equivalent) and related system dependencies to be installed separately; the package itself has no Python runtime dependencies but high friction due to these external requirements.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute PyLaTeX freely in commercial and private projects with minimal restrictions.

last release 2023-10-19 (1030 days) · last repo commit 2024-07-25 · 2,355 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 665,616 downloads/mo, #5,428 on PyPI

Verify before relying

pip install pylatex

from pylatex import Document, Section, Subsection

doc = Document('basic')
with doc.create(Section('Introduction')):
    doc.append('Hello world')
doc.generate_pdf()
  • Whether the package works reliably with modern Python versions beyond those listed in classifiers (3.5 and earlier are quite old).
  • Current state of maintenance and whether dormant status (last release 2023-10-19, last commit 2024-07-25) affects stability for new projects.
Same gist for agents: .md · .json

What it is and what it does

PyLaTeX is a Python library that lets you build LaTeX documents and snippets programmatically instead of writing raw LaTeX markup. It provides a Python API to construct document structure (sections, tables, figures, math) and then compile the result to PDF or LaTeX source. The library has no Python runtime dependencies but requires an external LaTeX processor (such as texlive) to be installed separately on your system.

It is designed for developers, educators, and researchers who want to generate technical documents, reports, or scientific papers from Python code—especially when document content is dynamic or generated from data. Common use cases include creating reports with embedded plots, generating exam papers, or building templated documents where content varies but structure stays the same.

Use it for

  • Generate technical reports or papers with dynamic content pulled from Python data structures or databases.
  • Create exam or assignment templates where questions, solutions, or metadata are stored in Python and rendered to PDF.
  • Build scientific or mathematical documents with embedded plots, tables, or computed results from analysis code.
  • Automate document generation for batch processing (e.g., certificates, invoices, or personalized letters).
  • Prototype or test LaTeX output without manually writing and debugging raw LaTeX code.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to generate LaTeX or PDF documents from Python and are comfortable installing and maintaining a LaTeX processor on your system.

The package is stable and permissively licensed, but maintenance is dormant (last release 2023-10-19); use it for established workflows rather than as a foundation for new, heavily customized projects. High install friction due to external LaTeX dependencies is the main trade-off.

Install

pylatex on PyPI

Before you install

Installation requires a LaTeX processor (texlive or equivalent) and related system dependencies to be installed separately; the package itself has no Python runtime dependencies but high friction due to these external requirements.

A LaTeX processor (e.g., texlive-latex-base, texlive-pictures, texlive-science, latexmk) must be installed on the system before use.

License in practice

MIT license is permissive; you can use, modify, and distribute PyLaTeX freely in commercial and private projects with minimal restrictions.

Quickstart

pip install pylatex

from pylatex import Document, Section, Subsection

doc = Document('basic')
with doc.create(Section('Introduction')):
    doc.append('Hello world')
doc.generate_pdf()

Verify before relying

  • Whether the package works reliably with modern Python versions beyond those listed in classifiers (3.5 and earlier are quite old).
  • Current state of maintenance and whether dormant status (last release 2023-10-19, last commit 2024-07-25) affects stability for new projects.

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionHigh. Source build required
Runtime dependenciesNone
MaintenanceDormant 1,030 days since the last release
Last repo commit
First released
Downloads665,616 / month, #5,428 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: End Users/DesktopIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Topic :: Software Development :: Code GeneratorsTopic :: Text Processing :: Markup :: LaTeX

Evidence: PyLaTeX-1.4.2.tar.gz

Tags

Capabilities
generate LaTeX from Pythoncreate PDF programmaticallyPython LaTeX document generationLaTeX code generatortypeset documents with Pythonautomated LaTeX compilationPython to PDF
Topics
document-generationlatexpdf-creation

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “generate LaTeX from Python”

  • PyLaTeXPyLaTeX generates LaTeX documents and code snippets from Python,…
  • latex2sympy2Parses LaTeX math expressions and converts them to SymPy symbolic…
  • sphinx-jupyterbook-latexA Sphinx extension that adds LaTeX output infrastructure for Jupyter…

Give your agent the search over MCP, or paste the wish link into any chat.

More Markup packages

PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
markdown-it-py Worth it
PyPI · Python Modules · released May 2026

A Python markdown parser that converts markdown to HTML following the CommonMark specification, with support for plugins and custom syntax rules.

Install it if you need reliable markdown-to-HTML conversion.

MITpure Python · 3.10+
613.8Mdownloads / mo
beautifulsoup4 Worth it
PyPI · Python Modules · released Jun 2026

Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.

Install it if you need to parse or extract data from markup documents.

MITpure Python · 3.7.0+
432.1Mdownloads / mo
et-xmlfile With conditions
PyPI · Markup · released Oct 2024

et_xmlfile writes large XML files with minimal memory overhead by serializing elements to disk as they are created, rather than holding the entire tree in memory.

Install it if incremental XML writing fits your use case; skip it if your XML documents are small or you already use lxml.

MITpure Python · 3.8+dormant
343.3Mdownloads / mo
tomlkit Worth it
PyPI · Markup · released Jul 2026

Parses and edits TOML files while preserving formatting, comments, and structure, then serializes them back with layout intact.

Install it if you're building tools that touch TOML files and user readability of the source matters.

MITpure Python · 3.9+
338.0Mdownloads / mo
docstring-parser Worth it
PyPI · Python Modules · released Apr 2026

Parses Python docstrings in ReST, Google, Numpydoc, and Epydoc formats, extracting structured information like descriptions, parameters, return types, and exceptions.

Install it if you need to programmatically read and extract structured data from Python docstrings.

MITpure Python · 3.8+
274.9Mdownloads / mo

See also pylatexenc · Sphinx · sphinx-jupyterbook-latex · rst2pdf · pybtex · pypandoc · latexcodec · sphinxcontrib-svg2pdfconverter · pypptx-with-oxml · genanki