CogDB

Embedded Graph Database for Python

Graphs · Vectors · Search

pip install cogdb

No server. No config. Runs in notebooks, apps, even your browser.

MIT LicenseDownloadsPyPI versionCode Coverage
from cog.torque import Graph g = Graph("cities") g.put("Tokyo", "is_a", "city") g.put("Tokyo", "known_for", "sushi") g.put("Tokyo", "country", "Japan") g.put("Naples", "is_a", "city") g.put("Naples", "known_for", "espresso") g.put("Naples", "country", "Italy") # auto-embed all nodes for semantic search g.vectorize() # Where should I go for coffee? g.v().k_nearest("coffee", k=1).inc("known_for").all()
Result
['Naples']

Stay in the Loop

Get notified about new features and releases