Skip to content

A simple and efficient file converter package for various data file types.

License

Notifications You must be signed in to change notification settings

HenokB/file-converter

Repository files navigation

file_converter

file_converter

A simple and efficient file converter package for various data file types.

GitHub Contributors Tests Coverage Issues GitHub pull requests

Features

  • Convert CSV to JSON and vice versa.
  • Convert CSV to TXT and vice versa.
  • Convert JSON to TXT and vice versa.
  • (More conversion features to be added…)

Installation

pip install file_converter

Usage:

Try your first file converter program

$ python
import pandas as pd
from file_converter import FileConverter
 # convert a txt file to a json format.
def txt_to_json(create_test_files):
    output_json = "tests/test_files/output_from_txt.json"
    FileConverter.txt_to_json(TXT_FILE, output_json)

Example usage:

Convert JSON to CSV

file_converter.FileConverter.json_to_csv("input_file.json", "output_file.csv")

Convert JSON to TXT

file_converter.FileConverter.json_to_txt("input_file.json", "output_file.txt")

Convert CSV to TXT

file_converter.FileConverter.csv_to_txt("input_file.csv", "output_file.txt")

Convert CSV to JSON

file_converter.FileConverter.csv_to_json("input_file.csv", "output_file.json")

Convert TXT to CSV

file_converter.FileConverter.txt_to_csv("input_file.txt", "output_file.csv")

Copyright

For license information, see LICENSE.txt.

Created by Henok B Ademtew, 2023

About

A simple and efficient file converter package for various data file types.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages