Skip to main content

mkmd

Make Markdown Documents in Python.

Features

  • Heading
  • Paragraph
  • Code Block
  • Horizontal Rule
  • Reference
  • Image
  • Unordered List
  • Ordered List

Installation

pip install mkmd

Basic Usage

import mkmd
from mkmd.utils import *

md = mkmd.Markdown()

(md
    .add_heading(f"Hello {bold_and_italic('MKMD')}",)
    
    .add_paragraph(f"""
        This markdown document was generated by using
        {refer('mkmd', '1')}. This is a quick example showing how to
        use it:
    """, wrapped = True)
    
    .add_codeblock("""
        import mkmd
        
        md = mkmd.Markdown()
        md.add_heading("Hello World")
        md.add_paragraph("Lorem ipsum dolor sit amet.")
    """, language = "python")
    
    .add_ordered_list(
        *"So many things are possible!".split()
    )
    
    .add_reference("1", "http://example.org", "Look at this")
    
    .add_image("Linux Mascot",
        "https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100"
    )
)

if __name__ == "__main__":
    md.save("example_result.md")

Links

Metadata

Release files for mkmd 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkmd 0.0.1
File Size Uploaded
mkmd-0.0.1.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mkmd 0.0.1
File Interpreter ABI Platform
mkmd-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / mkmd-0.0.1.tar.gz

Download URL mkmd-0.0.1.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
216647915b615d78e137caf5466c2dc4328415ed222cf0de5fde875c47103f38
BLAKE2b-256 checksum
How to use checksums
724326c859023059502971636b7832f5094243803f0a39a1b217901b1f4129a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Release files / mkmd-0.0.1-py3-none-any.whl

Download URL mkmd-0.0.1-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eecf57bd69e2ec7bf9f610a1e8645af1ed09f8ce8267115209bfab22a909a247
BLAKE2b-256 checksum
How to use checksums
ef05768ba613fb52f5f296ec95d3a64210e744ef45ed3560c03aa76bf4e7e608
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.8

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page