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.3

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.3
File Size Uploaded Provenance Actions
voyager_ogm-0.4.3.tar.gz 550.8 kB With provenance Details for voyager_ogm-0.4.3.tar.gz

Built distributions (wheels)

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

Total release size: 12.1 MB

Release files / voyager_ogm-0.4.3.tar.gz

Download URL voyager_ogm-0.4.3.tar.gz
Size 550.8 kB
Tags Source
SHA-256 checksum
How to use checksums
28ceb39f923c8bdd32e464fea35fe2f9f8164e89dbf2b44118fb8d3309b4c61b
BLAKE2b-256 checksum
How to use checksums
f17cf30a6bf02891485908aa84dadce0710469fa986e0ded7ff5216213864f50
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 / voyager_ogm-0.4.3-cp311-abi3-win_amd64.whl

Download URL voyager_ogm-0.4.3-cp311-abi3-win_amd64.whl
Size 2.5 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
be4a7f2d65f837c2f816140fc28d31997ee570156577d96c15dd96bb6bc14d33
BLAKE2b-256 checksum
How to use checksums
6caa6d9e9b827a9970ef7d2f46a30808fe49edccf81d078fb2a51c5d67d673b5
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 / voyager_ogm-0.4.3-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL voyager_ogm-0.4.3-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
d7dd979f28a5115ba7752c1e3f14df45f853e793473174ff89da2eaf26341282
BLAKE2b-256 checksum
How to use checksums
aa4d960b94f07b2c7af144f96937513d959c9ade946a150ec012c3c1b28a577a
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 / voyager_ogm-0.4.3-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL voyager_ogm-0.4.3-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
753f538e1f2c709799b231098b7db208760999b652e1fea848b6d428a3451335
BLAKE2b-256 checksum
How to use checksums
3e4ccb02032fdc4ffac05ec50ea85d2a0ec8d63a3a42f320e206ac981a6e51ce
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 / voyager_ogm-0.4.3-cp311-abi3-macosx_11_0_arm64.whl

Download URL voyager_ogm-0.4.3-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
1ab4e754ef410e997afcd26b0cd580e64b38e8fa4e2d53c698410c44688bd27b
BLAKE2b-256 checksum
How to use checksums
43084d14148f8971a260e609c13e65d9d175036bc90e57665ecfee2994c8520e
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 / voyager_ogm-0.4.3-cp311-abi3-macosx_10_12_x86_64.whl

Download URL voyager_ogm-0.4.3-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
cec7f5abad1a38b9226b73afc3ae40f9a327b3b56a676de9ec801b64d21d4da7
BLAKE2b-256 checksum
How to use checksums
0521ebdaa183d72596dc6f9955a22f57267eaa4ae1185456833c62d7fdf439b3
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 voyager-ogm 0.4.3

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.3.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