YAML to CSV Converter

This Python script converts YAML files to CSV format. The script is designed to handle a specific YAML structure, used for describing network configurations and service details, and convert it into a CSV file with a defined set of fields. This tool is particularly useful for network administrators and engineers who need to convert complex configuration files into an easy-to-read format.

Features

  • Handles multiple YAML structures including OS exporters, application exporters, blackbox exporters, and SSL exporters.
  • Supports multiple exporter types with varying details.
  • Produces a CSV output with a predefined set of fields.

Requirements

  • Python 3.7 or higher
  • PyYAML library

Usage

Command line usage:

python yaml_to_csv.py <input_yaml_file> <output_csv_file>

python

Replace <input_yaml_file> with the path to your input YAML file, and <output_csv_file> with the path where you want the CSV file to be saved.

Example

Given an input YAML file input.yaml, you can convert it to CSV format with the following command:

python yaml_to_csv.py input.yaml output.csv

Contributing

This project is open for contributions. Please fork this repository and create a pull request to propose changes.
License

This project is licensed under the MIT License. See the LICENSE file for more details.

css


This README provides a brief description of the script, its features, requirements, usage, example, and contribution guidelines. It's always a good idea to include a license for your project as well