Skip to main content

arango-query-core

Shared conceptual-model and NL substrate for the ArangoDB query transpilers — arango-cypher-py (Cypher→AQL) and arango-sparql-py (SPARQL→AQL) — and, through them, the contextual-data-fabric's federated query engine.

Carved out of arango-cypher-py (which previously shipped arango_query_core inside its own wheel) so both transpilers and the fabric pin one artifact instead of forking the same code three ways.

What's here

Subpackage / module Purpose
arango_query_core.mapping MappingBundle — the conceptual↔physical model contract (entities, relationships, physical annotations) shared by both transpilers and the analyzers' CSI pipeline
arango_query_core.owl_turtle / owl_rdflib OWL/Turtle ⇄ MappingBundle round-trip (rdflib optional, via the owl extra)
arango_query_core.aql / exec / extensions / errors AQL fragment types, safe execution helpers, extension registry, error base
arango_query_core.nl Language-agnostic NL→query engine: LLM providers (OpenAI / OpenRouter / Anthropic with prompt caching), BM25/dense few-shot retrieval, caller-supplied semantic postconditions, and the generate→validate→repair loop
arango_query_core.nl.seams QueryLanguageAdapter — the eight language-specific seams an adapter implements (grammar prompt, corpus, validator, repair rules, guardrails, entity/predicate/path grounding)
arango_query_core.nl.grounding / pathindex Entity, predicate, and relationship-path grounding retrieval (seams 6-8) — inject known IDs, schema conventions, and navigation hints into the prompt
arango_query_core.nl.host HostExtensions — what the host's engine accepts beyond the target language (registered predicates, per-property facts, its own limits), rendered after the grammar section via NLQueryEngine(host_extensions=...)
arango_query_core.nl.postconditions Caller-supplied semantic invariants enforced through the same generate→validate→retry budget, failing closed on exhaustion
arango_query_core.nl.synthbank Ontology-agnostic query-shape template catalog for synthetic few-shot bank generation

What's deliberately NOT here

The per-language adapters. nl2cypher (in arango-cypher-py) and nl2sparql (in arango-sparql-py) implement QueryLanguageAdapter next to their transpilers, because validating a generated query requires the transpiler stack — importing one here would create a dependency cycle or force consumers to install both query languages. Dependencies point one way: transpilers → this package.

Install

pip install arango-query-core            # mapping/aql core, zero deps
pip install "arango-query-core[owl]"     # + rdflib OWL round-trip
pip install "arango-query-core[nl]"      # + NL engine runtime deps
pip install "arango-query-core[dense]"   # + dense-embedding few-shot retrieval

Versioning

Consumed as a pinned artifact (contextual-data-fabric CC-9): consumers pin exact versions and re-run their golden suites on every bump. On PyPI since v0.1.0.

Metadata

Release files for arango-query-core 0.2.10

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

Source distribution (sdist)

Source distribution for arango-query-core 0.2.10
File Size Uploaded Provenance Actions
arango_query_core-0.2.10.tar.gz 120.5 kB With provenance Details for arango_query_core-0.2.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for arango-query-core 0.2.10
File Interpreter ABI Platform Actions
arango_query_core-0.2.10-py3-none-any.whl Python 3 none any Details for arango_query_core-0.2.10-py3-none-any.whl

Total release size: 191.8 kB

Release files / arango_query_core-0.2.10.tar.gz

Download URL arango_query_core-0.2.10.tar.gz
Size 120.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b7d15c8e20299568df88ec84148685546c30b18f27a2efef931e02fe7cabe4cb
BLAKE2b-256 checksum
How to use checksums
e1b6d0afa415c207e52e95b37e5e8c40b5e447fcaaf020410c70ffc7686ae262
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 23, 2026.

Transparency log

Release files / arango_query_core-0.2.10-py3-none-any.whl

Download URL arango_query_core-0.2.10-py3-none-any.whl
Size 71.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
39bef3a90516de7f71518508f54b4ae0f9a25204903b24fbd0c4282c8eb2d301
BLAKE2b-256 checksum
How to use checksums
96f0f8a107e71119a8632179ee8bb29af921306f37c16b6dc6f1dbdd516d4e53
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 23, 2026.

Transparency log

Security for arango-query-core 0.2.10

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for arango_query_core-0.2.10.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 23, 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.

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