A simple Markdown writer
Project description
python-md
python-md is a Python library for helping writing Markdown documents.
Installation
Use the package manager pip to install python-md.
pip install python-md
Usage
from python_md import Markdown
md = Markdown('examples.md')
content = md.h1('simple python-md example')
header = ['this', 'is', 'a', 'table', 'header']
body = [
['this', 'is', 'the', 'first', 'row'],
['this', 'is', 'the', 'second', 'row'],
['this', 'is', 'the', 'third', 'row'],
]
content += md.table(header, body)
md.write_to_file(content, 'w+')
For more examples of what you can do, check here:
- Code: examples.py
You can also use make to generate the examples file:
make examples
Testing
To run tests, use:
make tests
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
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
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 python-md-1.0.2.tar.gz.
File metadata
- Download URL: python-md-1.0.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
943dc77036031c16bb9270f5130b8e4a16206d169a575fcfe005d1ff1d258870
|
|
| MD5 |
1a2d860bf3fd7827b910b06e3b6080e4
|
|
| BLAKE2b-256 |
afc04bea2361eb4730ae6b1be2386f33876365a48d45902172048a4dc0d4fce3
|
File details
Details for the file python_md-1.0.2-py3-none-any.whl.
File metadata
- Download URL: python_md-1.0.2-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
010ec51372c1d9992a3e8329fcca3298aa09e8c5c5306f16be70eb679e7c8138
|
|
| MD5 |
eeba3b7115416e9e9db66758149f523a
|
|
| BLAKE2b-256 |
92743c4a1b210920619680c2f79a9727100601ac6d674d246589fb31eec519e8
|