A library for building and rendering markdown.
Project description
markdown-dom
🌳 An elegant Python library for handling Markdown with a DOM-like structure
🌟 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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c00685449705d31bcda3576d41e76e4c01208f90f60e70ff64a11dfac9926123
|
|
| MD5 |
26a7894fbc64516624571ff21c71cf46
|
|
| BLAKE2b-256 |
9f1556f698ab7db8399e1e9b1f85a18bdaac48c7dceea694ee0c79f7db746e64
|
File details
Details for the file markdown_dom-0.1.0-py3-none-any.whl.
File metadata
- Download URL: markdown_dom-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a1d6ba6d80d91afcb2a1627b2b76eb880d3e4826c258f2bd65a901546ba444f
|
|
| MD5 |
e5cfefac90f121ccb2a67d4e586cf3bf
|
|
| BLAKE2b-256 |
69005afd6644be55bdb336eda979ce01dd882e54e2cbff8d7326cec3c2cafe72
|