Skip to main content

A library for building and rendering markdown.

Project description

markdown-dom

🌳 An elegant Python library for handling Markdown with a DOM-like structure

License: MIT Python Version

🌟 Features

  • 🎯 Handle Markdown with a hierarchical DOM-like structure
  • 🔄 Dynamic Markdown generation and management
  • 🧩 Modular structure for high reusability
  • 🎨 Intuitive and easy-to-use API

🚀 Installation

pip install markdown-dom

📖 Usage

from markdown_dom import MarkdownSection, MarkdownSectionTitle

# Create hierarchical structure
doc = MarkdownSection(
    MarkdownSectionTitle("Project Title"),
    MarkdownSection(
        MarkdownSectionTitle("Subsection"),
        "This is a description.",
        MarkdownSection(
            MarkdownSectionTitle("Nested Section"),
            "Description at a deeper level"
        )
    )
)

# Render as Markdown
print(doc.render())

Output:

# Project Title
## Subsection
This is a description.
### Nested Section
Description at a deeper level

🛠️ Requirements

  • Python 3.10 or higher
  • pydantic >= 2.10.3

🤝 Contributing

Contributions are welcome! Feel free to open issues and pull requests.

📜 License

Released under the MIT License. See LICENSE for details.

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_dom-0.1.0.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

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

markdown_dom-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file markdown_dom-0.1.0.tar.gz.

File metadata

  • Download URL: markdown_dom-0.1.0.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.5

File hashes

Hashes for markdown_dom-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c00685449705d31bcda3576d41e76e4c01208f90f60e70ff64a11dfac9926123
MD5 26a7894fbc64516624571ff21c71cf46
BLAKE2b-256 9f1556f698ab7db8399e1e9b1f85a18bdaac48c7dceea694ee0c79f7db746e64

See more details on using hashes here.

File details

Details for the file markdown_dom-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for markdown_dom-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a1d6ba6d80d91afcb2a1627b2b76eb880d3e4826c258f2bd65a901546ba444f
MD5 e5cfefac90f121ccb2a67d4e586cf3bf
BLAKE2b-256 69005afd6644be55bdb336eda979ce01dd882e54e2cbff8d7326cec3c2cafe72

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