Skip to main content

Convert list of json objects to csv with optional filters

Project description

Description

Converts a list of json objects to a csv with optional filtering, sorting and date formatting.

Usage

usage: json_to_csv.py [-h] [-i [INCLUDE ...]] [-e [EXCLUDE ...]] [-o [ORDER ...]] [-n [NUMBER]] [-d [DATE_FIELDS ...]] [-df [DATE_FORMAT]]
                      [infile] [outfile]

Convert list of json objects to csv

positional arguments:
  infile                Input file, defaults to STDIN
  outfile               Output file, defaults to STDOUT

optional arguments:
  -h, --help            show this help message and exit
  -i [INCLUDE ...], --include [INCLUDE ...]
                        Include fields, defaults to all
  -e [EXCLUDE ...], --exclude [EXCLUDE ...]
                        Exclude fields, defaults to none
  -o [ORDER ...], --order [ORDER ...]
                        Order fields, defaults to none
  -n [NUMBER], --number [NUMBER]
                        Number of records to process, defaults to all
  -d [DATE_FIELDS ...], --date-fields [DATE_FIELDS ...]
                        Date fields, defaults to none
  -df [DATE_FORMAT], --date-format [DATE_FORMAT]
                        Datetime format, defaults to none

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

json_to_csv_filter-1.4.0.tar.gz (7.9 kB view hashes)

Uploaded Source

Built Distribution

json_to_csv_filter-1.4.0-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page