Skip to main content

Utility package for programmatically creating markdown documents

Project description

Markdown Toolkit

INFO: This readme is dynamically generated via generate_readme.py.

A python library for creating markdown.

This library heavily utilises context managers to encapsulate logical blocks in the markdown. Primarily this is used to keep track of the heading levels, so nested Heading context managers will be aware of the parent header level.

Example Usage

from markdown_toolkit import MarkdownBuilder, Heading

with MarkdownBuilder() as doc:
    with Heading(doc, "Markdown Toolkit"):
        doc.paragraph("Example Paragraph.")
        with Heading(doc, "Nested Header"):
            doc.paragraph("Nested.")

with open("example.md", "w", encoding="UTF-8") as file:
    doc.write(file)

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

markdown-toolkit-0.1.0.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

markdown_toolkit-0.1.0-py3-none-any.whl (5.6 kB view hashes)

Uploaded Python 3

Supported by

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