Skip to main content

astraeadb

Python client for AstraeaDB, a graph database with vector search written in Rust. Talks to the AstraeaDB server over newline-delimited JSON-over-TCP (no dependencies) with an optional Apache Arrow Flight transport and pandas integration.

Installation

pip install astraeadb                 # core client, zero dependencies
pip install "astraeadb[arrow]"        # + Arrow Flight transport (pyarrow)
pip install "astraeadb[pandas]"       # + DataFrame helpers (pandas)
pip install "astraeadb[all]"          # everything

Requires Python 3.9+. A running AstraeaDB server is required — see the AstraeaDB documentation.

Quick start

from astraeadb import AstraeaClient

with AstraeaClient(host="127.0.0.1", port=7687) as client:
    alice = client.create_node(["Person"], {"name": "Alice", "age": 30})
    bob = client.create_node(["Person"], {"name": "Bob"})
    client.create_edge(alice, bob, "KNOWS", weight=0.9)

    # Traversals
    client.bfs(alice, max_depth=2)
    client.dfs(alice, max_depth=2)
    client.shortest_path(alice, bob, weighted=True)

    # Lookups
    client.find_by_label("Person")
    client.find_edge_by_type("KNOWS")

    # Vector similarity (results carry node_id + distance; smaller is closer)
    hits = client.vector_search([0.1, 0.9, 0.3], k=5)

    # Graph algorithms (computed server-side)
    client.run_pagerank()
    client.run_louvain()
    client.run_betweenness_centrality()

    # GQL
    client.query("MATCH (p:Person) RETURN p.name")

Features

  • CRUD — create/read/update/delete nodes and edges with arbitrary properties
  • Lookupsfind_by_label, find_edge_by_type, bulk delete_by_label
  • Traversalsbfs, dfs, shortest_path, neighbors
  • Temporal queries — time-travel variants (bfs_at, dfs_at, neighbors_at, shortest_path_at) over edge validity windows
  • Graph algorithmsrun_pagerank, run_louvain, run_connected_components, run_degree_centrality, run_betweenness_centrality
  • Vector searchvector_search (k-NN), hybrid_search (graph + vector), semantic_neighbors, semantic_walk
  • GraphRAGextract_subgraph and graph_rag for LLM context assembly
  • Statisticsgraph_stats and raw get_subgraph export
  • GQLquery for Cypher-style graph queries
  • Batchcreate_nodes, create_edges, delete_nodes, delete_edges
  • DataFrames — import/export helpers in astraeadb.dataframe (pandas)
  • Arrow Flight — high-throughput columnar transport when pyarrow is installed

Clients

Class Transport Notes
JsonClient JSON/TCP Always available, zero dependencies
ArrowClient Arrow Flight Requires pyarrow; high-throughput bulk/query
AstraeaClient Auto-select Uses Arrow when available, falls back to JSON
from astraeadb import JsonClient       # explicit JSON/TCP
from astraeadb import ArrowClient      # explicit Arrow Flight (needs pyarrow)
from astraeadb import AstraeaClient    # unified, auto-selecting

License

MIT © 2026 James Harris.

Download files

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

Source Distribution

astraeadb-0.1.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

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

astraeadb-0.1.0-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: astraeadb-0.1.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for astraeadb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 09a3d45d0a3e27577b6842da5e00189043ecc14895ddc280b93b49790cd774c1
MD5 61792cf1527c2ed2d693ef64526f4c4d
BLAKE2b-256 382ca6ab8581ca94fae247c380058195ccb25dffe0d8ebebedfdf59265d47093

See more details on using hashes here.

File details

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

File metadata

  • Download URL: astraeadb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.3

File hashes

Hashes for astraeadb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 624d5e83433af903b437bccaf1df99e9df47f9c97f95b367824ac3aa6e25d334
MD5 4e130634aa8b56f520e8aae9391beebc
BLAKE2b-256 194c706b953e2b898b03d6ef64fda22ba7da24e9b08ccc7e8d0669bb5bf8f7d2

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