Skip to main content

CSV2JSON

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

Supported Python versions PEP8

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

Release files for tojson 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tojson 0.1.0
File Size Uploaded
tojson-0.1.0.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tojson 0.1.0
File Interpreter ABI Platform
tojson-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.1 kB

Release files / tojson-0.1.0.tar.gz

Download URL tojson-0.1.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c26641d946c80015697d4d3e93c2f8c4c4743b9bbb8762daad72f0e2c837a4ef
BLAKE2b-256 checksum
How to use checksums
2ea01fa3b1bce6bbd7c5c5b12d80b515603f4787a1dc68e63de4781df838a2c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.10.5 Darwin/21.5.0

Release files / tojson-0.1.0-py3-none-any.whl

Download URL tojson-0.1.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7009231daf99ddf9358af2fd8aec7afd829713bcec8da141d70334487fbec5c
BLAKE2b-256 checksum
How to use checksums
0ac9dadd71c6ea8de971ec437d73ac43943456a887508130c52b17b25deca7de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.14 CPython/3.10.5 Darwin/21.5.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page