Skip to main content

Toolframe Relate Graph

Store and traverse a private, local graph for each Toolframe plugin. The embedded Relate engine executes parameterized Cypher and saves each caller's nodes and relationships in a separate .rl file.

Install

Use a running Toolframe application with Python 3.14+ and a compatible relate-db wheel. Replace APP with your application home.

toolframe --home APP plugin add pypi:toolframe-graph-relate==0.1.1 --enable

Find out who Mira mentors

In the consuming plugin's definition, declare the service dependency.

from toolframe_sdk import Requirement

# PluginDefinition(..., requires=requires)
requires = {"graph": Requirement(service="toolframe.graph", version=1)}

Mira mentors Nilo. In a service handler, create a Person node for each of them and a MENTORS relationship from Mira to Nilo. Then follow Mira's outgoing relationships to find her mentees.

await self.context.call("graph", "execute", {
    "statement": """
        MERGE (mentor:Person {name: $mentor})
        MERGE (mentee:Person {name: $mentee})
        MERGE (mentor)-[:MENTORS]->(mentee)
    """,
    "parameters": {"mentor": "Mira", "mentee": "Nilo"},
})

result = await self.context.call("graph", "query", {
    "statement": """
        MATCH (:Person {name: $mentor})-[:MENTORS]->(person:Person)
        RETURN person.name AS mentee ORDER BY mentee
    """,
    "parameters": {"mentor": "Mira"},
})
print(result["rows"])  # [{"mentee": "Nilo"}]

Service contract

Method Behavior
query Runs one Cypher statement on a read-only handle. The first read sees an empty graph.
execute Runs one statement in a transaction. The service checks the result before committing.

Both methods accept a statement and an optional parameters object and return columns, rows, and Relate's mutation counters in stats. A row is keyed by column name. Returned nodes keep their IDs, labels and properties. Relationships keep their endpoints and type. Paths contain ordered nodes and relationships. Temporal values use ISO strings, points include their SRID and coordinates, and vectors include their coordinate type and values.

Use LIMIT and project only the properties you need. Each call can return up to 1,000 rows and 900,000 bytes of JSON. An oversized result raises result_too_large and rolls back the statement. For writes that may be retried after losing a response, use stable keys and MERGE.

Data and access

Toolframe supplies the application and caller identities. Each caller has its own Relate bundle at data/graphs/<sha256-of-application-id>/<plugin-id>.rl under the application home. The provider serializes calls and closes the bundle after each operation. Keep the application ID, consuming plugin ID and graph files together across restarts, reloads and restores. To back up the graph, stop the application and copy its configuration and data/graphs/ directory.

The service is internal. A consuming plugin controls which operations it exposes to Dashboard, HTTP or MCP clients. Graphs must fit in memory when open.

Metadata

Release files for toolframe-graph-relate 0.1.1

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

Source distribution (sdist)

Source distribution for toolframe-graph-relate 0.1.1
File Size Uploaded Provenance Actions
toolframe_graph_relate-0.1.1.tar.gz 262.6 kB With provenance Details for toolframe_graph_relate-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for toolframe-graph-relate 0.1.1
File Interpreter ABI Platform Actions
toolframe_graph_relate-0.1.1-py3-none-any.whl Python 3 none any Details for toolframe_graph_relate-0.1.1-py3-none-any.whl

Total release size: 268.9 kB

Release files / toolframe_graph_relate-0.1.1.tar.gz

Download URL toolframe_graph_relate-0.1.1.tar.gz
Size 262.6 kB
Tags Source
SHA-256 checksum
How to use checksums
86a2ec6eada072cc1c13a0c988927c9256691d4ae171bca481dcfbaf51ebe900
BLAKE2b-256 checksum
How to use checksums
5017e7752b0ddb978a95545c1b32765d5532421cd20f59c76c72fe9e6dbaf25a
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 Dec 3, 2026.

Transparency log

Release files / toolframe_graph_relate-0.1.1-py3-none-any.whl

Download URL toolframe_graph_relate-0.1.1-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2910d280ee9c1b2ba6f8e9d0ab1049ba4c4a137d877393771d2ee6843ef6a9f
BLAKE2b-256 checksum
How to use checksums
edb2388776b260b6540e1ed57fe8440f0ebdaa4acbdc0d40af8976e6bb1cc3e0
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 Dec 3, 2026.

Transparency log

Security for toolframe-graph-relate 0.1.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for toolframe_graph_relate-0.1.1.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 Dec 3, 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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

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