Skip to main content

rxeval

Run the logic inside an ODK/OpenRosa form — relevant, constraint, required, calculate — from Python. The engine is Rust with no dependencies; this is a binding to it.

An independent project, not affiliated with, maintained by or endorsed by ODK (getodk.org) or Enketo. Its behaviour was decided against two reference engines, used as oracles: JavaRosa 5.1.0 and Enketo's openrosa-xpath-evaluator.

A form is a small program. Until something runs it, a server can only take whatever a device sends and hope the device was right.

Python is where ODK forms are already built — pyxform is Python — so the check that matters most belongs in the script that builds the form, before it is published, rather than after a week of fieldwork.

pip install rxeval

Will this form travel?

The ODK ecosystem has two evaluation engines: JavaRosa, inside ODK Collect and KoboCollect, and Enketo's openrosa-xpath-evaluator, inside web forms. Neither is a superset of the other, and the gaps do not announce themselves — an expression Collect cannot evaluate usually yields nothing rather than an error, so the form fills in, the interview finishes, and a column comes back empty.

check_form reads a form and says which of its rules will behave differently, before anyone collects with it:

import rxeval

for issue in rxeval.check_form("survey.xml"):
    print(issue["says"])
/data/resident[2]/name (relevant): a bare positional predicate — JavaRosa
  returns nothing for [n]; use [position() = n] on Collect / KoboCollect.
  Write [position() = 2] instead.
/data/total (calculate): /p/morador/maior, which this form's instance has no
  node for — the path matches nothing, so the rule reads an empty node-set:
  a calculation comes out 0, a comparison comes out false, and a relevant
  hides its question for the whole of fieldwork, identically on both
  engines. Write /data/morador/maior instead.

Each issue is a dict: path, rule, expression, construct, breaks, effect, suggestion, and says — the whole sentence, already written. An empty list means the form travels.

Every rule behind this was decided by putting the same expression to both reference engines and reading the two answers. Of 126 expressions in the corpus the two agree on 99 and disagree with each other on 26, each recorded with the side rxeval follows and why.

What the rules say about a submission

findings = rxeval.submission_findings("survey.xml", "submission.xml")
for f in findings:
    print(f["kind"], f["path"], f["says"])

kind is constraint, required, calculation or not-evaluated. A rule the engine could not evaluate comes back as not-evaluated, never as a pass: a rule that did not run has not been satisfied, and reporting it as clean would be the one failure worth avoiding.

today and now default to the submission's own metadata, so a date rule is judged against the day the work was done — otherwise a submission that was valid on collection starts failing later, and the report changes while the data does not.

One expression, for working it out

rxeval.eval_expression("count(/data/resident)", "submission.xml")   # '3'

An expression this engine cannot evaluate raises, rather than returning a plausible value.

Filling a form, not only judging one

s = rxeval.Session("survey.xml", today="2026-08-14", now="2026-08-14T09:00:00Z")
s.set("/data/age", "9")

out = s.recompute()
out["calculated"]   # {'/data/adult': 'no', '/data/years_left': '9'}
out["relevant"]     # {'/data/guardian': True, ...}
out["missing"]      # ['/data/guardian']
out["invalid"]      # [] — rejected answers, with the form's own message

s.add_row("/data/resident")
s.instance_xml()    # what would be submitted

Calculations run in dependency order, so one feeding another settles in a single pass, and only paths whose value actually changed are reported.

Every function takes either a path or the XML itself: a caller holding XML should not have to write it to a file first, and a caller holding a path should not have to read it.

Licence

BSD-2-Clause.

Metadata

Release files for rxeval 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rxeval 0.1.2
File Size Uploaded Provenance Actions
rxeval-0.1.2.tar.gz 89.9 kB With provenance Details for rxeval-0.1.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for rxeval 0.1.2
File Actions
rxeval-0.1.2-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details for rxeval-0.1.2-cp38-abi3-win_amd64.whl
rxeval-0.1.2-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-64 Details for rxeval-0.1.2-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
rxeval-0.1.2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.8 abi3 Linux glibc 2.17+ ARM64 Details for rxeval-0.1.2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
rxeval-0.1.2-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details for rxeval-0.1.2-cp38-abi3-macosx_11_0_arm64.whl
rxeval-0.1.2-cp38-abi3-macosx_10_12_x86_64.whl CPython 3.8 abi3 macOS 10.12+ x86-64 Details for rxeval-0.1.2-cp38-abi3-macosx_10_12_x86_64.whl

Total release size: 4.0 MB

Release files / rxeval-0.1.2.tar.gz

Download URL rxeval-0.1.2.tar.gz
Size 89.9 kB
Tags Source
SHA-256 checksum
How to use checksums
387fa3c188fa188e54b8808a5e5e59514c1ff34e52e5bc2686d60f4df3930c83
BLAKE2b-256 checksum
How to use checksums
2d9ab66af0b92adebacd2523a43e1be2ed87d42033be827e327dcb774c7b1c8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / rxeval-0.1.2-cp38-abi3-win_amd64.whl

Download URL rxeval-0.1.2-cp38-abi3-win_amd64.whl
Size 734.5 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f059c51606a7b53dc280ed58fbe68bcdb432013029f211176d68c2ba0bab2304
BLAKE2b-256 checksum
How to use checksums
ecf9b9798cf372d87397e253f689439b7c6a95bf5a74cdb531538d4f1e2fb81e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / rxeval-0.1.2-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL rxeval-0.1.2-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 832.1 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
e404a306512e60d625d8dc26d9697b011abaf36c5098db3955b5bc3e6caa51df
BLAKE2b-256 checksum
How to use checksums
38a305459f415d1002644337740bf06b6bc3de4c46a74b755d07cc6adb532cb0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / rxeval-0.1.2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL rxeval-0.1.2-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 793.8 kB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
1aa9ac19beb647ffb8cdfeaa14ff2c4bbb92a5d5437d9c11b3a3539eff070f3f
BLAKE2b-256 checksum
How to use checksums
6abcabc74a68267e4450c992b75370ff759c48fef8800ccc5e1296d3cc65d202
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / rxeval-0.1.2-cp38-abi3-macosx_11_0_arm64.whl

Download URL rxeval-0.1.2-cp38-abi3-macosx_11_0_arm64.whl
Size 744.2 kB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
28763a06acaa5c9444764a7ebcad1190bd253f0de7f84cd925849bf02f79d1a2
BLAKE2b-256 checksum
How to use checksums
4acc9405bd57ed34ac65bae50526ee0069752f3a23e6bbfed2a03c37f2973b9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Release files / rxeval-0.1.2-cp38-abi3-macosx_10_12_x86_64.whl

Download URL rxeval-0.1.2-cp38-abi3-macosx_10_12_x86_64.whl
Size 788.2 kB
Tags CPython 3.8 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
bb63f3f5693cb9eaefa514d0b1acc4b64530e2c21dcc24d03dd3296c172db31f
BLAKE2b-256 checksum
How to use checksums
a04b64cb45bf9f8b6442860a25d06f4bd8df5c28ea27fd43202ca4b19ce1728a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

Security for rxeval 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for rxeval-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

6 release files Full provenance

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