documentation-generator
Tiny, composable Markdown document builder with optional HTML/PDF export.
Features
- Build documents by chaining: paragraphs, tables, lists, code blocks, and remarks.
- Render to Markdown; convert to HTML (Markdown lib) or PDF (WeasyPrint).
- Tables render in GitHub‑style Markdown (via tabulate).
Requirements
- Python 3.13+
Installation
pip install -e . # install project (editable)
# or just runtime deps
pip install tabulate Markdown
# to enable PDF export
pip install weasyprint
# dev/test extras
pip install -e .[dev]
Quick Start
from document import Document
import pandas as pd
doc = (
Document()
.add_title("Sample Doc")
.add_paragraph("Intro text", heading="Introduction")
.add_list(["alpha", "beta", "gamma", "delta"], heading="Things")
.add_codeblock("print('hello')", language="python")
.add_remark("Remember to pin versions.", kind="TIP")
)
# Tables accept pandas or polars DataFrame
df = pd.DataFrame({"a": [1, 2], "b": [3, 4]})
doc.add_table(df, heading="Data", footer="auto‑generated")
# Render as Markdown string
markdown_text = doc.render()
print(markdown_text)
# Save to files
doc.save_as("md") # writes document.md
doc.save_as("html") # writes document.html
# Requires: pip install weasyprint
doc.save_as("pdf") # writes document.pdf
Remarks (Admonitions)
add_remark(text, kind)supports:INFO,WARNING,DANGER,TIP.- Uses Markdown admonition syntax, e.g.
!!! warning. - HTML conversion enables
admonition,tables, andfenced_codeextensions.
Testing
pip install -e .[dev]
pytest -q
Metadata
Release files for documentation-generator 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| documentation_generator-0.1.0.tar.gz | 8.3 kB | Without provenance | Details for documentation_generator-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| documentation_generator-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for documentation_generator-0.1.0-py3-none-any.whl |
Total release size: 17.7 kB
Release files / documentation_generator-0.1.0.tar.gz
| Download URL | documentation_generator-0.1.0.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fec69bc34f89c0f003c566ae888601e3f186cb5294bce5f81f8a85392be836d6
|
|
BLAKE2b-256 checksum How to use checksums |
dd77c7fefb339f36095639b6fe638697610d213a1cb306763f6c25ac0643aa39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.10
|
Release files / documentation_generator-0.1.0-py3-none-any.whl
| Download URL | documentation_generator-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99df7486a86823d6a1b655cb86d962c2dd399875e217c8fda9b502a494a53d11
|
|
BLAKE2b-256 checksum How to use checksums |
03eecd417a8ce2407e4a0dc70dc92f5da3d09f45dfcb80428b09654daae6a130
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.10
|
Security for documentation-generator 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.