{"id":5268,"library":"jsonata-python","title":"JSONata for Python","description":"jsonata-python is a pure Python implementation of the JSONata query and transformation language, currently at version 0.6.2. It aims to provide 100% of the language features of JSONata without external dependencies, offering a performant alternative to Python libraries that rely on JavaScript bindings. The library maintains a steady release cadence with updates reflecting the upstream JSONata specification.","status":"active","version":"0.6.2","language":"en","source_language":"en","source_url":"https://github.com/rayokota/jsonata-python","tags":["json","query","transformation","data processing"],"install":[{"cmd":"pip install jsonata-python","lang":"bash","label":"Install with pip"},{"cmd":"pipx install jsonata-python","lang":"bash","label":"Install CLI with pipx"}],"dependencies":[],"imports":[{"symbol":"Jsonata","correct":"import jsonata\nexpr = jsonata.Jsonata(...)"}],"quickstart":{"code":"import jsonata\n\ndata = {\"example\": [{\"value\": 4}, {\"value\": 7}, {\"value\": 13}]}\nexpr_str = \"$sum(example.value)\"\n\nexpr = jsonata.Jsonata(expr_str)\nresult = expr.evaluate(data)\nprint(f\"JSONata expression: {expr_str}\")\nprint(f\"Input data: {data}\")\nprint(f\"Result: {result}\")","lang":"python","description":"This quickstart demonstrates how to define a JSONata expression and apply it to a Python dictionary using the jsonata-python library. It calculates the sum of 'value' fields within a nested array."},"warnings":[{"fix":"Upgrade to Python 3.11 or a newer version to ensure full support for all JSONata date/time functions.","message":"JSONata date/time functions that utilize ISO 8601 formats are only fully supported when running on Python 3.11 or newer. Users on older Python versions (3.10 and below) may experience issues or limited functionality with these specific date/time operations.","severity":"gotcha","affected_versions":"<0.6.0 (before full Python 3.11+ support for date/time functions)"},{"fix":"Always use `import jsonata` and refer to the `jsonata-python` documentation for API details. Be aware that other `jsonata` packages on PyPI may refer to different implementations.","message":"This 'jsonata-python' library is a pure Python implementation. Older Python wrappers for JSONata, such as 'jsonata-wrapper' or 'pyjsonata', often relied on JavaScript bindings and may have different APIs, performance characteristics, and potential compatibility issues. Ensure you are importing from 'jsonata' if you intend to use this pure Python version.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-13T00:00:00.000Z","next_check":"2026-07-12T00:00:00.000Z"}