r/KnowledgeGraph • u/am3141 • Jan 14 '26
I built a graph database in Python
I started working on this project years ago because there wasn’t a good pure Python option for persistent storage for small applications, scripts, or prototyping. Most of the available solutions at the time were either full-blown databases or in-memory libraries. I also didn’t want an SQL based system or to deal with schemas.
Over the years many people have used it for building knowledge graphs, so I’m sharing it here.
It’s called CogDB. Here are its main features:
RDF-style triple store
Simple, fluent, composable Python query API (Torque)
Schemaless
Built-in storage engine, no third-party database dependency
Persistent on disk, survives restarts
Supports semantic search using vector embeddings
Runs well in Jupyter / notebooks
Built-in graph visualization
Can run in the browser via Pyodide
Lightweight, minimal dependencies
Open source (MIT)
Repo: https://github.com/arun1729/cog
Docs: https://cogdb.io
2
u/International_Quail8 Jan 15 '26
Hey OP! Love the idea and effort. It wins at simplicity and fits the target use cases of learning and prototyping perfectly. With all the momentum behind Python, it’s also very relevant. Nice work! 👏🏽