Skip to main content

Python client for CoordiNode — graph + vector + full-text database

Project description

coordinode

PyPI Python License CI

Python gRPC client for CoordiNode — the graph-native hybrid retrieval engine for AI and GraphRAG.

Installation

pip install coordinode
uv add coordinode

Requirements

  • Python 3.11+
  • Running CoordiNode instance (docker compose up -d or binary)

Quick Start

from coordinode import CoordinodeClient

# Synchronous client — context manager handles connection lifecycle
with CoordinodeClient("localhost:7080") as db:
    # Cypher query — returns List[Dict[str, Any]]
    result = db.cypher("RETURN 1 AS n")
    print(result)  # [{'n': 1}]

    # With parameters
    rows = db.cypher(
        "MATCH (n:Person {name: $name}) RETURN n.age AS age",
        params={"name": "Alice"},
    )

    # Create nodes
    db.cypher(
        "CREATE (n:Document {title: $title, embedding: $vec})",
        params={"title": "RAG intro", "vec": [0.1, 0.2, 0.3, 0.4]},
    )

    # Health check
    assert db.health()

Async Client

import asyncio
from coordinode import AsyncCoordinodeClient

async def main():
    async with AsyncCoordinodeClient("localhost:7080") as db:
        rows = await db.cypher("MATCH (n:Concept) RETURN n.name AS name LIMIT 5")
        for row in rows:
            print(row["name"])

asyncio.run(main())

Connection Options

# host:port string
client = CoordinodeClient("localhost:7080")

# Separate host and port
client = CoordinodeClient("localhost", port=7080)

# TLS
client = CoordinodeClient("db.example.com:7443", tls=True)

# Custom timeout (seconds)
client = CoordinodeClient("localhost:7080", timeout=60.0)

Type Mapping

CoordiNode properties map to Python types automatically:

Python type CoordiNode type
int int_value
float float_value
str string_value
bool bool_value
bytes bytes_value
list[float] Vector (HNSW-indexable)
list[Any] PropertyList
dict[str, Any] PropertyMap
None unset (null semantics)

Vector Search

# Store a node with a vector embedding
db.cypher(
    "CREATE (d:Doc {title: $title, embedding: $vec})",
    params={"title": "RAG intro", "vec": [0.1] * 384},
)

# Nearest-neighbour search (requires HNSW index — coming in v0.4)
results = db.vector_search(
    label="Doc",
    property="embedding",
    vector=[0.1] * 384,
    top_k=10,
    metric="cosine",  # "cosine" | "l2" | "dot" | "l1"
)
for r in results:
    print(r.node.id, r.distance)

Related Packages

Package Description
langchain-coordinode LangChain GraphStore + GraphCypherQAChain
llama-index-graph-stores-coordinode LlamaIndex PropertyGraphStore

Links

Support

USDT TRC-20

USDT (TRC-20): TFDsezHa1cBkoeZT5q2T49Wp66K8t2DmdA

GitHub Sponsors · Open Collective

License

Apache-2.0

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

coordinode-0.6.0.tar.gz (29.2 kB view details)

Uploaded Source

Built Distribution

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

coordinode-0.6.0-py3-none-any.whl (62.4 kB view details)

Uploaded Python 3

File details

Details for the file coordinode-0.6.0.tar.gz.

File metadata

  • Download URL: coordinode-0.6.0.tar.gz
  • Upload date:
  • Size: 29.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for coordinode-0.6.0.tar.gz
Algorithm Hash digest
SHA256 e2aa600f55b4a97c644ffd7637092aad6f0ea1d77a859a15c69d24225dc72abe
MD5 4e057ffe478b46461084291b1b55cb74
BLAKE2b-256 1f80de7f808783c06bdb1f7752dba4ff0d4673d988b241e0440bc9af1ec23354

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinode-0.6.0.tar.gz:

Publisher: release.yml on structured-world/coordinode-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file coordinode-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: coordinode-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 62.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for coordinode-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63d453d5c0b4667eaa282260bdf97318db75ec0a09b028c9ee162af7208629a5
MD5 5d50d1f63024992deee75b4d9b46d87d
BLAKE2b-256 d3b2382df767d80fb2e1bbfd535c3e13262b78f3836e06ef3b16543e19d2ff69

See more details on using hashes here.

Provenance

The following attestation bundles were made for coordinode-0.6.0-py3-none-any.whl:

Publisher: release.yml on structured-world/coordinode-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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