A CLI tool to export CSV files to JSON format
Project description
CSV2JSON
🚀 A CLI tool to export CSV files to JSON format.
Requirements
⬇️ Installation
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
csv2json foo.csv
# Orient as list
csv2json foo.csv -o list
# Compressed output and use zero indentation (minified)
csv2json foo.csv -c -i 0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tojson-0.1.0.tar.gz
(3.4 kB
view hashes)
Built Distribution
tojson-0.1.0-py3-none-any.whl
(3.7 kB
view hashes)