Skip to main content

LlamaIndex Graph Stores Integration: ApertureDB

ApertureDB is a Multimodal Database. The storage is modelled as a graph.

It can be used off cloud, On premise, and it comes with a public community edition which can run on a laptop too.

This integration implements the PropertyGraph interface of llama_index, which can be used to Store and query a Knowledge Graph using ApertureDB as the store.

Assuming a working and accessible instance of ApertureDB the following examples would work for adding nodes to your graph, and retrieving them.

from llama_index.core.graph_stores.types import Relation, EntityNode
from llama_index.graph_stores.ApertureDB import ApertureDBGraphStore

entities = [
    EntityNode(label="PERSON", name="James"),
    EntityNode(label="DISH", name="Butter Chicken"),
    EntityNode(label="DISH", name="Scrambled Eggs"),
    EntityNode(label="INGREDIENT", name="Butter"),
    EntityNode(label="INGREDIENT", name="Chicken"),
    EntityNode(label="INGREDIENT", name="Eggs"),
    EntityNode(label="INGREDIENT", name="Salt"),
]

relations = [
    Relation(
        label="EATS",
        source_id=entities[0].id,
        target_id=entities[1].id,
    ),
    Relation(
        label="EATS",
        source_id=entities[0].id,
        target_id=entities[2].id,
    ),
    Relation(
        label="CONTAINS",
        source_id=entities[1].id,
        target_id=entities[3].id,
    ),
    Relation(
        label="HAS",
        source_id=entities[1].id,
        target_id=entities[4].id,
    ),
    Relation(
        label="COMPRISED_OF",
        source_id=entities[2].id,
        target_id=entities[5].id,
    ),
    Relation(
        label="GOT",
        source_id=entities[2].id,
        target_id=entities[6].id,
    ),
]
graph_store = ApertureDBGraphStore()
graph_store.upsert_nodes(entities)
graph_store.upsert_relations(relations)

Retrieve nodes:

# get all.
print(pg_store.get())

# get nodes by ID.
kg_nodes = pg_store.get(ids=[entities[0].id])
print(kg_nodes)

# get paths from a node
paths = pg_store.get_rel_map(kg_nodes, depth=2)
import json

print(json.dumps(paths, indent=2, default=str))

Metadata

Release files for llama-index-graph-stores-ApertureDB 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llama-index-graph-stores-ApertureDB 0.5.0
File Size Uploaded Provenance Actions
llama_index_graph_stores_aperturedb-0.5.0.tar.gz 5.8 kB Without provenance Details for llama_index_graph_stores_aperturedb-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-graph-stores-ApertureDB 0.5.0
File Interpreter ABI Platform Actions
llama_index_graph_stores_aperturedb-0.5.0-py3-none-any.whl Python 3 none any Details for llama_index_graph_stores_aperturedb-0.5.0-py3-none-any.whl

Total release size: 12.1 kB

Release files / llama_index_graph_stores_aperturedb-0.5.0.tar.gz

Download URL llama_index_graph_stores_aperturedb-0.5.0.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
11b0f2cf31420468ea396822ea15fb58f88efd6d0de353e867c57ba06fd0119f
BLAKE2b-256 checksum
How to use checksums
13893d040883204b4055f108b4ba5659ea94a315f1f1d12ba68c71dbf6860402
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / llama_index_graph_stores_aperturedb-0.5.0-py3-none-any.whl

Download URL llama_index_graph_stores_aperturedb-0.5.0-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0f2b09227a65edd783e4106b20520f7f978a795e625866ccf4771ebb98a54ac2
BLAKE2b-256 checksum
How to use checksums
18d9f3c7f4df728155e8ab866a4006cd78316a018089db54ea81d26d9ad33cdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for llama-index-graph-stores-ApertureDB 0.5.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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