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.1.tar.gz (4.4 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.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file python-md-1.0.1.tar.gz.

File metadata

  • Download URL: python-md-1.0.1.tar.gz
  • Upload date:
  • Size: 4.4 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.6

File hashes

Hashes for python-md-1.0.1.tar.gz
Algorithm Hash digest
SHA256 97521714b9eaf31146bfdca48818bf50da93ab1fd54a43369cbd99b825517857
MD5 72df86e24114279739142ffbc30a3c0c
BLAKE2b-256 ffd74e4f71968d4e3a076343ac7d64fb312a5814786ee66e7a96edd24a3b80ad

See more details on using hashes here.

File details

Details for the file python_md-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: python_md-1.0.1-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.6

File hashes

Hashes for python_md-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 acd56c59527729e7ceec7a04c08c1e801c41b7d5fdd91fcc138bbb1c1a284a10
MD5 b7bc3dde52cba53df5e02ecaa87f998b
BLAKE2b-256 6b30cf41ebf3fc913cedf9bd859c25a07da78e40ec53c0f7963be6953fdb4134

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