Skip to content

Simple Python package to write Markdown document directly in a Python script

License

Notifications You must be signed in to change notification settings

aidanjungo/Markdownpy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPi version License Black code style

Markdownpy

Simple Python package to write Markdown document directly from a Python script.

Install

Locally

Clone the repository install it with pip:

git clone git@github.com:aidanjungo/Markdownpy.git
cd Markdownpy
pip install -e .

From PyPi

You can install the last version of Markdownpy with pip:

pip install markdownpy

Usage

You can import and use the package in any Python script and use it to generate result or documentation files on the fly.

from markdownpy.markdownpy import MarkdownDoc

md = MarkdownDoc("MySimpleMarkdown.md")

md.h1("H1 title")
md.h2("H2 title")
md.p("paragraph")

md.h2("Lists")

mylist = []
for i in range(5):
    mylist.append(f"item_{i}")

md.blist(mylist)

md.save()

From more example, checkout example.py

By the way, this README has been generated using Markdownpy, you can see the python script here: readme.py

About

Simple Python package to write Markdown document directly in a Python script

Topics

Resources

License

Stars

Watchers

Forks

Languages