Skip to main content

JFTL — JSONFold Template Language

JFTL is a JSON-based language for transforming and generating JSON.

JFTL templates are themselves valid JSON. They combine JSON navigation, iteration, conditional logic, variables, transformations, and expression evaluation while keeping the template structure close to the JSON being produced.

Installation

Install the Python implementation from PyPI:

pip install jsonfold-template

Command Line

The Python implementation installs the jftl-pyrun command:

jftl-pyrun template.json

Use:

jftl-pyrun --help

for the complete set of command-line options.

Python API

The public Python API is available through jsonfold.template:

from jsonfold.template import create_engine

engine = create_engine()

Example

A simple JFTL transformation:

{
  "$": true,
  "data": "$_datasets.input",
  "out": {
    "name": "$.name",
    "price": "$py=_['price'] * 2"
  }
}

JFTL supports navigation, iteration, filtering, conditional output, datasets, variables, transformations, multiple expression engines, and other JSON transformation operations.

Documentation

Full language documentation, reference material, and cookbook examples are available on the JFTL documentation site.

Implementations

JFTL is a language rather than a single implementation.

This package contains the Python implementation. Other implementations may provide different execution engines, integrations, performance characteristics, or additional capabilities while implementing the JFTL language.

License

The Python implementation of JFTL is released under the MIT License.

See LICENSE for details.

Download files

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

Source Distribution

jsonfold_template-0.4.2.tar.gz (42.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jsonfold_template-0.4.2-py3-none-any.whl (48.1 kB view details)

Uploaded Python 3

File details

Details for the file jsonfold_template-0.4.2.tar.gz.

File metadata

  • Download URL: jsonfold_template-0.4.2.tar.gz
  • Upload date:
  • Size: 42.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for jsonfold_template-0.4.2.tar.gz
Algorithm Hash digest
SHA256 13c0b80b014a91a2c6cb3d973b3107cf25089ea742858edb6436ebe2423638bb
MD5 472479fe9ac766b23faee2311ac5d405
BLAKE2b-256 0577e3f7f0627c4372e9957bcb2440898c253328130866d50e01d8ee8920dded

See more details on using hashes here.

File details

Details for the file jsonfold_template-0.4.2-py3-none-any.whl.

File metadata

File hashes

Hashes for jsonfold_template-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6e533bacde32a31bb8692c6a642c4f0780bcc9e526c6d9b8eafa889216328ef5
MD5 3cdfff5fb956fd3341a978236603edd9
BLAKE2b-256 abdb2ad3c4394031e2937d7fe06db2496194ecb329b52a01f23c2dd2589d0e98

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.2 This release

2 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