Metadata-Version: 2.1
Name: tojson
Version: 0.1.0
Summary: A CLI tool to export CSV files to JSON format
License: MIT
Author: Alyetama
Author-email: malyetama@pm.me
Requires-Python: >=3.7,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: numpy (>1.18.0)
Requires-Dist: pandas (>1.0.0)
Description-Content-Type: text/markdown

# CSV2JSON

🚀 A CLI tool to export CSV files to JSON format.

[![Supported Python versions](https://img.shields.io/badge/Python-%3E=3.7-blue.svg)](https://www.python.org/downloads/) [![PEP8](https://img.shields.io/badge/Code%20style-PEP%208-orange.svg)](https://www.python.org/dev/peps/pep-0008/) 


## Requirements
- 🐍 [python>=3.7](https://www.python.org/downloads/)


## ⬇️ Installation

```sh
pip install tojson
```


## ⌨️ Usage

```
➜ csv2json --help  # You can also use the alias `tojson` or `csvtojson`

usage: csv2json [-h] [-o {dict,list,series,split,records,index}] [-i INDENT]
                [-c]
                path [path ...]

positional arguments:
  path                  Path to a single file/directory or multiple
                        files/directories

options:
  -h, --help            show this help message and exit
  -o {dict,list,series,split,records,index}, --orient {dict,list,series,split,records,index}
                        The type of the values of the dictionary
  -i INDENT, --indent INDENT
                        JSON output indentation
  -c, --compress        Compress the output
```


## 📕 Examples

```sh
csv2json foo.csv
```

```sh
# Orient as list 
csv2json foo.csv -o list
```

```sh
# Compressed output and use zero indentation (minified)
csv2json foo.csv -c -i 0
```

