Skip to main content

Converts a YAML/JSON file or python Dict/List to a Markdown file

Project description

YAML to Markdown Converter

A Python utility to take a JSON / YAML file or a python dict / list and create a Markdown file.

Usage

In Python Code example:

Convert a Pyton dictionary to Markdown:

from yaml_to_markdown.md_converter import MDConverter

data = {
    "name": "John Doe",
    "age": 30,
    "city": "Sydney",
    "hobbies": ["reading", "swimming"],
}
converter = MDConverter()
with open("output.md", "w") as f:
    converter.convert(data, f)

Content of output.md file will be:

## Name
John Doe
## Age
30
## City
Sydney
## Hobbies
* reading
* swimming

From the Command Line

You can also use the command line interface to convert a JSON or YAML file to Markdown. Here's an example:

Convert a JSON file to Markdown:

yaml-to-markdown --output-file output.md --json-file test.json

Convert a YAML file to Markdown:

yaml-to-markdown --output-file output.md --yaml-file test.yaml

Developer Guide

Please see the DEVELOPER.md file for more information on how to contribute to this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

yaml-to-markdown-0.1.1712460996.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file yaml-to-markdown-0.1.1712460996.tar.gz.

File metadata

File hashes

Hashes for yaml-to-markdown-0.1.1712460996.tar.gz
Algorithm Hash digest
SHA256 0c444f9104626170e37ed95518541b90c0841b0c18e42df80630df7bfc52e6c9
MD5 65190b182b5133da0b2a3e9f6fb36f2b
BLAKE2b-256 055aa99760c02dcf5b979422815eb0f89f75d5c9bfd4eb5d5f81390d84c3c039

See more details on using hashes here.

File details

Details for the file yaml_to_markdown-0.1.1712460996-py3-none-any.whl.

File metadata

File hashes

Hashes for yaml_to_markdown-0.1.1712460996-py3-none-any.whl
Algorithm Hash digest
SHA256 51aa4d5db8909bf6d4eb33a278ade3b22baed1ba0aa490669165590b96c1770c
MD5 5da3218a3c7f6b61ca5c76592433772b
BLAKE2b-256 4bc5b1a319ed5270ef6245fb7a5b93e422b86e7864124b40303709ba8ee3ee5a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page