Skip to main content

Shared conceptual-model and NL substrate for ArangoDB query transpilers (arango-cypher-py, arango-sparql-py)

Project description

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 few-shot retrieval, and the generate→validate→repair loop
arango_query_core.nl.seams QueryLanguageAdapter — the five language-specific seams an adapter implements (grammar prompt, corpus, validator, repair rules, guardrails)

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

Versioning

Consumed as a pinned artifact (contextual-data-fabric CC-9): consumers pin exact versions and re-run their golden suites on every bump. Pre-PyPI, pin a git tag.

Project details


Download files

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

Source Distribution

arango_query_core-0.1.0.tar.gz (43.7 kB view details)

Uploaded Source

Built Distribution

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

arango_query_core-0.1.0-py3-none-any.whl (35.6 kB view details)

Uploaded Python 3

File details

Details for the file arango_query_core-0.1.0.tar.gz.

File metadata

  • Download URL: arango_query_core-0.1.0.tar.gz
  • Upload date:
  • Size: 43.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for arango_query_core-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0d37ea6a4707e6f330c7c7ac3f2900c6726c96309ea5b39d71895f94cb42d18b
MD5 2f829fcb180f3bf83437c0d2f080181b
BLAKE2b-256 30d981a4c5a846899e7255e7099cda7c998d8ffb7c624af9e8dc4f660b851625

See more details on using hashes here.

File details

Details for the file arango_query_core-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for arango_query_core-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d7996c3c03a8c547b87d5004e2f1254231bd70b4813b9d0636d519677f031884
MD5 3b12c945571a6b1cd2e677318bf76c74
BLAKE2b-256 093327f9d790f90be8bda4990fe792fd1b9bc319525852cd0fcbad2e83769e51

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page