Skip to main content

Python jsonl query engine

Project description

Build Status Coverage PyPI Documentation Status

JF

JF, aka “jndex fingers” or more commonly “json filter pipeline”, is a jq-clone written in python. It supports evaluation of python one-liners, making it especially appealing for data scientists who are used to working with python.

Installing

pip install jf

Basic usage

Filter selected fields

$ cat samples.jsonl | jf 'map({id: x.id, subject: x.fields.subject})'
{"id": "87086895", "subject": "Swedish children stories"}
{"id": "87114792", "subject": "New Finnish storybooks"}

Features

supported formats: * json (uncompressed, gzip, bz2) * jsonl (uncompressed, gzip, bz2) * yaml (uncompressed, gzip, bz2) * csv and xlsx support if pandas and xlrd is installed * markdown table output support * xlsx (excel) * parquet

transformations: * construct generator pipeline with map, hide, filter * access json dict as classes with dot-notation for attributes * datetime and timedelta comparison * age() for timedelta between datetime and current time * first(N), last(N), islice(start, stop, step) * head and tail alias for last and first * firstnlast(N) (or headntail(N)) * import your own modules for more complex filtering * Support stateful classes for complex interactions between items * drop your filtered data to IPython for manual data exploration * use –ordered_dict to keep items in order * sklearn toolbox for machine learning * running restful service for the transformation pipeline

Known bugs

  • IPython doesn’t launch perfectly with piped data

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

jf-0.8.4.tar.gz (20.1 kB view details)

Uploaded Source

File details

Details for the file jf-0.8.4.tar.gz.

File metadata

  • Download URL: jf-0.8.4.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for jf-0.8.4.tar.gz
Algorithm Hash digest
SHA256 dc04a6694c154a533b98b11c47f193ff03b7544c86af4f90c76ce72fdc769239
MD5 228d3015a3387ce3463f46bf13edf55a
BLAKE2b-256 f08b5a62a272398143e17a2cc95e9984745fbe0be3c1c4eb12f028213714368f

See more details on using hashes here.

Supported by

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