Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Converts YAML input to JSON output.

Project Description

Converts YAML input to JSON output. Relies on PyYaml, which supports YAML 1.0 and 1.1, but not 1.2.

yml2json has been tested on Python 2.7.11 and Python 3.5.1. YMMV.


yml2json sample.yml
yml2json sample.yml --pretty
yml2json sample.yml --output sample.json
yml2json sample.yml --output sample.json --pretty

cat sample.yml | yml2json
cat sample.yml | yml2json --pretty
cat sample.yml | yml2json --output sample.json
cat sample.yml | yml2json --output sample.json --pretty


Using Pip:

pip install yml2json


First, install VirtualEnv.

pip install --upgrade virtualenv

Next, activate your virtual environment and install the dependencies.

virtualenv vendor && \
source vendor/bin/activate && \
pip install -r requirements.txt && \
pip install -r requirements2.txt


Here’s the process for contributing:

  1. Fork yml2json to your GitHub account.
  2. Clone your GitHub copy of the repository into your local workspace.
  3. Write code, fix bugs, and add tests with 100% code coverage.
  4. Commit your changes to your local workspace and push them up to your GitHub copy.
  5. You submit a GitHub pull request with a description of what the change is.
  6. The contribution is reviewed. Maybe there will be some banter back-and-forth in the comments.
  7. If all goes well, your pull request will be accepted and your changes are merged in.

Release History

This version
History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(5.6 kB) Copy SHA256 Hash SHA256
Wheel py2 Apr 5, 2016
(3.4 kB) Copy SHA256 Hash SHA256
Source None Apr 5, 2016

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers