Skip to main content

Voyager OGM for Python

Multi-dialect Object-Graph Mapper (OGM) and query compiler for Python.

PyPI PyPI - Python Versions CI License

Voyager OGM lets you define graph models with Python type annotations and build a query once as an abstract syntax tree, then compile it to the dialect your database speaks: openCypher (Neo4j, Memgraph, FalkorDB), SQL:2023 PGQ GRAPH_TABLE (DuckDB/DuckPGQ, PostgreSQL), ISO GQL, or Apache AGE. Results stream into Polars DataFrames through the Apache Arrow C Data Interface, and optional extras add Bolt, PostgreSQL, embedded DuckDB and Relate, SQLAlchemy, NetworkX, and notebook integrations.

Installation

With pip:

pip install voyager-ogm

In a uv project (adds it to pyproject.toml):

uv add voyager-ogm

Into an existing virtual environment with uv:

uv pip install voyager-ogm

A base install pulls in only polars and pyarrow (tzdata is added on Windows). Prebuilt wheels are available for Python 3.11 through 3.14 on:

  • Linux: manylinux_2_28 on x86_64 and aarch64
  • macOS: x86_64 and arm64
  • Windows: x86_64

The wheels are abi3 (cp311-abi3), so one wheel per platform covers every supported Python version.

Optional extras

Some integrations live behind extras so the base install stays small:

Extra Adds What it enables Install
neo4j neo4j Bolt bridge to Neo4j and Memgraph (bolt://, neo4j://) pip install "voyager-ogm[neo4j]"
age psycopg[binary] PostgreSQL and Apache AGE bridge (postgresql://, age://) pip install "voyager-ogm[age]"
duckdb duckdb Embedded DuckDB / DuckPGQ bridge (duckdb://) pip install "voyager-ogm[duckdb]"
relate relate-db Embedded Relate bridge (relate://, relatedb://) pip install "voyager-ogm[relate]"
sqlalchemy sqlalchemy SQLAlchemy interop and SQLAlchemy-backed query compilation (HybridSession) pip install "voyager-ogm[sqlalchemy]"
analytics networkx NetworkX graph export via to_networkx() pip install "voyager-ogm[analytics]"
notebook marimo, anywidget, traitlets Interactive show() / explore() viewer widget in Marimo and Jupyter/VS Code notebooks pip install "voyager-ogm[notebook]"

In a uv project, swap pip install for uv add (or use uv pip install for an existing environment). Combine extras in one command, with pip:

pip install "voyager-ogm[neo4j,sqlalchemy]"

or with uv:

uv add "voyager-ogm[neo4j,sqlalchemy]"

The duckdb and age extras carry a python_version < '3.14' marker, so on Python 3.14 they install without their driver. The FalkorDB/Redis bridge uses the falkordb package, which has no extra: pip install falkordb.

Pre-releases

Pre-releases (X.Y.ZaN) are published to TestPyPI, not PyPI. Install one with PyPI as the fallback index for the dependencies, with pip:

pip install --pre -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ voyager-ogm

or with uv:

uv pip install --prerelease allow --index https://test.pypi.org/simple/ --default-index https://pypi.org/simple/ --index-strategy unsafe-best-match voyager-ogm

Quick start

Define models, build one query, and compile it to each dialect:

from voyager_ogm import Node, Relationship, Query, node, relationship


@node(label="Person")
class Person:
    name: str
    age: int
    city: str = "London"


@relationship(type_name="WORKS_AT")
class WorksAt:
    since: int = 2024


@node(label="Company")
class Company:
    name: str


p = Person()
c = Company()
w = WorksAt()

query = (
    Query.match(p)
    .to(w)
    .node(c)
    .where(p.age >= 21, c.name == "Acme Corp")
    .return_(p.name, p.age, company_name=c.name)
    .order_by(p.name)
    .limit(10)
)

# 1. Compile to openCypher (Neo4j, Memgraph, FalkorDB)
cypher = query.compile("cypher")
print(cypher.statement)
# MATCH (_person_0:Person)-[_works_at_0:WORKS_AT]->(_company_0:Company)
# WHERE (_person_0.age >= $p0) AND (_company_0.name = $p1)
# RETURN _person_0.name, _person_0.age, _company_0.name AS company_name
# ORDER BY _person_0.name ASC LIMIT 10

# 2. Compile to SQL:2023 PGQ (DuckDB, PostgreSQL)
pgq = query.compile("sql_pgq", graph_name="corp_graph")
print(pgq.statement)

# 3. Compile to ISO GQL
gql = query.compile("iso_gql")
print(gql.statement)

Features

  • Multi-dialect query compilation for openCypher, SQL:2023 PGQ (GRAPH_TABLE), ISO GQL, and Apache AGE (overview, example).
  • Zero-copy Apache Arrow and Polars streaming through the Arrow C Data Interface, without materializing Python objects (overview, example).
  • Rule-based query optimizer with predicate pushdown, constant folding, and dead-clause elimination (overview, example).
  • Complex expressions and graph functions for arithmetic trees, string operations, and built-in graph functions (overview, example).
  • Real transactions, identity map, and unit of work for batched writes and consistent in-memory objects (overview, example).
  • Interactive graph viewer with force-directed physics, schema legend chips, and an inspector drawer (overview, example).
  • Database compatibility with Neo4j, Memgraph, Apache AGE, DuckDB/DuckPGQ, FalkorDB, and PostgreSQL (overview, example).

License

Voyager OGM is dual-licensed under either the MIT License or the Apache License, Version 2.0, at your option.

Metadata

Release files for voyager-ogm 0.4.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 voyager-ogm 0.4.2
File Size Uploaded Provenance Actions
voyager_ogm-0.4.2.tar.gz 542.1 kB With provenance Details for voyager_ogm-0.4.2.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for voyager-ogm 0.4.2
File Actions
voyager_ogm-0.4.2-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for voyager_ogm-0.4.2-cp311-abi3-win_amd64.whl
voyager_ogm-0.4.2-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details for voyager_ogm-0.4.2-cp311-abi3-manylinux_2_28_x86_64.whl
voyager_ogm-0.4.2-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details for voyager_ogm-0.4.2-cp311-abi3-manylinux_2_28_aarch64.whl
voyager_ogm-0.4.2-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for voyager_ogm-0.4.2-cp311-abi3-macosx_11_0_arm64.whl
voyager_ogm-0.4.2-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for voyager_ogm-0.4.2-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 12.0 MB

Release files / voyager_ogm-0.4.2.tar.gz

Download URL voyager_ogm-0.4.2.tar.gz
Size 542.1 kB
Tags Source
SHA-256 checksum
How to use checksums
81026254b48e3009dee137aad429d9347cdbb2022cc40fd1c6d91b6054a1537b
BLAKE2b-256 checksum
How to use checksums
6e3219fc610cb533e6707228c5adb5b0f430db97c7059c899feecce9ebe73959
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 22, 2026.

Transparency log

Release files / voyager_ogm-0.4.2-cp311-abi3-win_amd64.whl

Download URL voyager_ogm-0.4.2-cp311-abi3-win_amd64.whl
Size 2.5 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
4626bd83cfe57e98ac124532a1c2166e741a65c3337ff2db35fc42d3a440b6dd
BLAKE2b-256 checksum
How to use checksums
a1bfa8acd2fbc3c77594c9a6c876f5fd55ead627d58f76197fca4ba29cea2035
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 22, 2026.

Transparency log

Release files / voyager_ogm-0.4.2-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL voyager_ogm-0.4.2-cp311-abi3-manylinux_2_28_x86_64.whl
Size 2.4 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
11bd68523a8fe1bc9071aaf94e893220602b467a2a050f1a81512d936720a08e
BLAKE2b-256 checksum
How to use checksums
a2269d723f1acb6140ce38e9546d4e728f556736292982d6aebd77f2af6fd3e0
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 22, 2026.

Transparency log

Release files / voyager_ogm-0.4.2-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL voyager_ogm-0.4.2-cp311-abi3-manylinux_2_28_aarch64.whl
Size 2.2 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
5c51452661ce812feca8fc6bea01e1f35fb87c19bc0ece17971b7b537f0e4eeb
BLAKE2b-256 checksum
How to use checksums
a859c48138a12f2065e4eb28219c016137b640d22787cf49d277b4f6a5274499
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 22, 2026.

Transparency log

Release files / voyager_ogm-0.4.2-cp311-abi3-macosx_11_0_arm64.whl

Download URL voyager_ogm-0.4.2-cp311-abi3-macosx_11_0_arm64.whl
Size 2.1 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
dfef488acc5bcbb1a69d25d740f8e21b04b84a2e734a262557ecfa4d44fdee04
BLAKE2b-256 checksum
How to use checksums
458cadc61395990f3674dda7a63348d121e0964d0c613d51d433a719d4a177b0
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 22, 2026.

Transparency log

Release files / voyager_ogm-0.4.2-cp311-abi3-macosx_10_12_x86_64.whl

Download URL voyager_ogm-0.4.2-cp311-abi3-macosx_10_12_x86_64.whl
Size 2.3 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
087a06d39ff25f329e39208d42cf4402054cedb4eb36bf88ea0ea7513b440bfb
BLAKE2b-256 checksum
How to use checksums
e10bdd65f449ef6c06aaf88345e3174a354ff963bbd81a418782bc180a2382d7
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 22, 2026.

Transparency log

Security for voyager-ogm 0.4.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 voyager_ogm-0.4.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 22, 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