python-json2csv
Convert json array data to csv.
Note: zencore-json2csv rename to python-json2csv
Install
pip install python-json2csv
Usage
E:\>json2csv --help
Usage: json2csv [OPTIONS]
Options:
-f, --file FILENAME Input file name, use - for stdin.
--file-encoding TEXT Input file encoding.
-o, --output FILENAME Output file name, use - for stdout.
--output-encoding TEXT Output file encoding.
-k, --keys TEXT Output field names. Comma separated string list.
-p, --path TEXT Path of the data.
--help Show this message and exit.
Examples
Example 1
INPUT:
[
[1,2,3],
[2,3,4]
]
OUTPUT:
1,2,3
2,3,4
COMMAND:
cat input.txt | json2csv -o output.txt
Example 2
INPUT:
[
{"f1": 11, "f2": 12, "f3": 13},
{"f1": 21, "f3": 23, "f2": 22}
]
OUTPUT:
11,12,13
21,22,23
COMMAND:
cat input.txt | json2csv -o output.txt -k f1,f2,f3
Example 3
INPUT:
{
"data": {
"list": [
[1,2,3],
[2,3,4],
]
}
}
OUTPUT:
1,2,3
2,3,4
COMMAND:
cat input.txt | json2csv -o output.txt -p data.list
Releases
v0.2.0 2019-11-05
- Rename from zencore-json2csv to python-json2csv.
- Fix console application install method in setup.py.
v0.1.1 2018-02-27
- Simple json2csv console utils released.
Metadata
Release files for python-json2csv 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python-json2csv-0.2.0.tar.gz | 2.7 kB | Without provenance | Details for python-json2csv-0.2.0.tar.gz |
Release files / python-json2csv-0.2.0.tar.gz
| Download URL | python-json2csv-0.2.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16c16b876eb4adc547183c664b3635b9b8bd8fef2f8f27bca1d82d2ae8e489f6
|
|
BLAKE2b-256 checksum How to use checksums |
967180d02aafcb99e20ffafcafd63714cc72164dd8c78b4140dce0d569047329
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.8
|
Security for python-json2csv 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.