Metadata-Version: 2.1
Name: jf
Version: 1.0.9
Summary: Python jsonl query engine
Home-page: https://github.com/alhoo/jf
Download-URL: https://github.com/alhoo/jf/archive/1.0.9.tar.gz
Author: Lasse Hyyrynen
Author-email: lasse.hyyrynen@pm.me
Maintainer: Lasse Hyyrynen
Maintainer-email: lasse.hyyrynen@pm.me
License: MIT
Keywords: json,jsonl,yaml,jq
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Utilities
Provides-Extra: dev
License-File: LICENSE

|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 '{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 openpyxl is installed
-  markdown table output support
-  xlsx (excel)
-  parquet

transformations:

-  import and use python modules with –import
-  import additional json for merging and joining using –import
   name=filename.json
-  initialize transformations with –init
-  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 and
   transformations

   -  Support stateful classes for complex interactions between items

-  sklearn toolbox for machine learning
-  running restful service for the transformation pipeline

.. |Build Status| image:: https://api.travis-ci.com/alhoo/jf.svg?branch=master
   :target: https://travis-ci.com/alhoo/jf
.. |Coverage| image:: https://codecov.io/github/alhoo/jf/coverage.svg?branch=master
   :target: https://codecov.io/github/alhoo/jf
.. |PyPI| image:: https://img.shields.io/pypi/v/jf.svg
   :target: https://pypi.python.org/pypi/jf
.. |Documentation Status| image:: https://readthedocs.org/projects/jf/badge/?version=latest
   :target: https://jf.readthedocs.io/en/latest/?badge=latest


