Skip to main content

A simple Python package for deterministic Markdown documents

Project description

simple-document

Deterministic, append-only Markdown documents with a small, explicit Python API.

Installation

uv add simple-document

Or with pip:

pip install simple-document

Usage

from simdoc import Doc

doc = Doc()
doc.h1("Simple Document")
doc.p("First line\nSecond line")
doc.ul(["alpha", ["beta", "gamma"], "delta"])
doc.code("print('hi')", lang="py")
doc.table([
    {"b": "x|y", "a": "1\n2"},
    {"a": None, "b": "ok"},
])
doc.hr()

markdown = doc.to_markdown()
doc.save("example.md")

Example script

Run the full example that exercises every block type:

uv run python examples/example_all_blocks.py

The script writes examples/example_output.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simdoc-0.1.1.tar.gz (19.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simdoc-0.1.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file simdoc-0.1.1.tar.gz.

File metadata

  • Download URL: simdoc-0.1.1.tar.gz
  • Upload date:
  • Size: 19.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for simdoc-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0bffd5db5bf93c8197b3daf1db228e989bf72741ed9e2f28b0a92ef39fb33e1d
MD5 a948d84a5ebc4ca9c43f2da51a3e1222
BLAKE2b-256 2a3051223f4d41c7d40c53c7cbc9ee6919b44beb57e3f22e1d4a9c1b421a23ab

See more details on using hashes here.

File details

Details for the file simdoc-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: simdoc-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.22

File hashes

Hashes for simdoc-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7cec5b6fff502854f8d7b01b35530a4d331ccd0308317f90470e8a8c871cc293
MD5 e0b4ea477d26c3f1a9049e39e86f5324
BLAKE2b-256 5edfa3bc160459704ffde8a07a0a3c6b02b59d16c4c45f6491282f447a330401

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page