Skip to main content

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:

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

MIT

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

python-md-1.0.2.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

python_md-1.0.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

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

Hashes for python-md-1.0.2.tar.gz
Algorithm Hash digest
SHA256 943dc77036031c16bb9270f5130b8e4a16206d169a575fcfe005d1ff1d258870
MD5 1a2d860bf3fd7827b910b06e3b6080e4
BLAKE2b-256 afc04bea2361eb4730ae6b1be2386f33876365a48d45902172048a4dc0d4fce3

See more details on using hashes here.

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

Hashes for python_md-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 010ec51372c1d9992a3e8329fcca3298aa09e8c5c5306f16be70eb679e7c8138
MD5 eeba3b7115416e9e9db66758149f523a
BLAKE2b-256 92743c4a1b210920619680c2f79a9727100601ac6d674d246589fb31eec519e8

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