graph-ted-db
Local property-graph storage for Python. Your data lives in a folder on disk; open it from your process, query it in-process, and optionally sync that folder like any other files. No database server to run for the default path.
Package: graph-ted-db · Import: graph_ted_db · Repo: graph-ted/graph-ted-db · License: MIT
Status: the public API and on-disk format below are what we ship.
pip install graph-ted-dbis the intended install; until the package is on PyPI, use a checkout (pip install -e .) or a wheel path.
Install
pip install graph-ted-db
Requires Python 3.10+.
Quick start
from graph_ted_db import GraphStore, init_graph
init_graph("./my-graph", name="demo", exist_ok=True)
g = GraphStore.open("./my-graph")
alice = g.make_node(labels=["Person"], props={"name": "Alice"})
bob = g.make_node(labels=["Person"], props={"name": "Bob"})
g.make_edge(type="KNOWS", from_id=alice.id, to_id=bob.id)
print(g.get_node(alice.id).props["name"])
CLI:
graph-ted-db init ./my-graph --name demo --exist-ok
graph-ted-db put-node ./my-graph --label Person --prop name=Alice
graph-ted-db ls-nodes ./my-graph
graphted-db is an alias for the same command.
Optional HTTP (localhost only by default; see HTTP docs):
graph-ted-db serve ./my-graph
# in another terminal:
curl -s http://127.0.0.1:8099/health
curl -s http://127.0.0.1:8099/cypher -H 'Content-Type: application/json' \
-d '{"query":"MATCH (n:Person) RETURN n.name AS name"}'
Features
- Folder = database — nodes, edges, and embeddings as sharded JSONL; readable, backupable, syncable
- In-process API —
put/get/iter/deletewithout opening a network port - openCypher queries —
g.execute(...)runs a documented subset of openCypher for graph-pattern queries (openCypher subset) - Optional HTTP — localhost endpoint for openCypher queries when another process needs the store (HTTP docs)
- Sync-friendly — multiple devices can write at once; last-write-wins per record; conflict-copy shards merged on read
- NetworkX-style helpers —
add_node,add_edge,neighbors, and related methods on the sameGraphStore(no algorithm suite)
What it is and isn't
It is:
- A Python library that stores a property graph (nodes, edges, properties, embeddings) as plain JSONL files in one folder.
- In-process: open, read, write and query from your own Python process. No server to install or run.
- A documented subset of openCypher, plus NetworkX-style helpers.
- Sync-friendly across devices: multiple devices can add and edit at the same time; concurrent edits to the same record resolve to the latest version. The folder can live in OneDrive, Dropbox or an
rclone bisyncfolder (see Sharing). - Small: no runtime dependencies beyond the Python standard library.
It isn't:
- A database server, a hosted service or a multi-tenant system. The optional HTTP endpoint is for local processes on the same machine.
- Encrypted. Files are ordinary files; protect them with disk encryption and OS permissions.
- A complete Cypher implementation or a Neo4j replacement. Unsupported clauses fail with an error rather than being ignored.
- A graph-algorithm library. Use NetworkX or similar on exported data.
- Built for very large graphs. The whole graph is loaded into memory when it opens; see the tested sizes in Overview.
- Stable across minor versions before 1.0 (see Versioning).
- Telemetry-enabled. It makes no network calls of its own.
When to use it
Good fit for prototypes, local tools, agents, and small trusted groups that want a property graph next to the app.
Choose a server graph database when you need multi-tenant hosting, fine-grained remote auth, or a complete query language and enterprise feature set out of the box.
Security
Data is stored as ordinary files. The library does not encrypt the graph folder. Security matches your environment: disk or volume encryption, OS account permissions, backups, sync tools, and whether anything listens on the network.
- Airgapped host + encrypted volume — can be very strong; treat that environment as your boundary.
- Synced or shared folders — anyone with access to the folder can read what you stored (including properties).
- HTTP serve — defaults to localhost; binding beyond loopback requires an explicit host and a token. That protects the port, not the files on disk.
Choose storage and network to match how sensitive the data is.
Documentation
Docs: graph-ted.com/graph-ted-db/docs, built from the docs/ folder in this repository. Preview locally: see PREVIEW.md.
| Doc | Contents |
|---|---|
| Overview | Product overview |
| On-disk format | On-disk layout |
| openCypher subset | Supported openCypher subset |
| Trademarks | Trademarks |
| HTTP | Local HTTP serve |
Trademarks
openCypher is a trademark of Neo4j, Inc. Other names are trademarks of their respective owners; no endorsement implied. See Trademarks.
Versioning
Pre-1.0 (0.1.x). Until 1.0.0, minor versions may include breaking changes; they are noted in release notes. From 1.0.0, breaking changes bump the major version.
Development
pip install -e ".[dev]"
pytest
Feedback and issues
- Bugs, enhancement requests, docs problems: open an issue using one of the forms.
- Questions and ideas: Discussions.
- Security vulnerabilities: report privately as described in SECURITY.md, never in a public issue.
Contributing: see CONTRIBUTING.md.
Related
graph-ted-db is the local store for the graph-ted toolkit (graph-ted.com). This repository is the database library only.
Metadata
Release files for graph-ted-db 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| graph_ted_db-0.1.1.tar.gz | 71.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| graph_ted_db-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 148.3 kB
Release files / graph_ted_db-0.1.1.tar.gz
| Download URL | graph_ted_db-0.1.1.tar.gz |
|---|---|
| Size | 71.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0580cb2ebba54eaf756f5f559ffe69c254562f308e2abdb3d6fdb16ae998fe5
|
|
BLAKE2b-256 checksum How to use checksums |
099eeac56ca0ede4225bb60fe599032a0baae79a0f672cb5dfd40d93f1f113db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 10, 2026.
Transparency logRelease files / graph_ted_db-0.1.1-py3-none-any.whl
| Download URL | graph_ted_db-0.1.1-py3-none-any.whl |
|---|---|
| Size | 77.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a4597f997337c9901cdc04ff989315264d104264c4ca4cd6bf0511571172397
|
|
BLAKE2b-256 checksum How to use checksums |
edf907352d98ffbc0a89ed75be19ef40afc5a3642ddd2036c123d349e0239243
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Oct 10, 2026.
Transparency log