arun1729/cog

Embedded Graph Database for Python. Lives inside your Python process. Quick setup. No server. Runs in notebooks, apps, even your browser.

What it solves

CogDB provides a persistent, embedded graph database that runs directly inside a Python process. It eliminates the need to manage a separate database server, making it easier to integrate graph data structures into Python applications, Jupyter notebooks, and browser-based environments.

How it works

CogDB is a triple store that models data as Node → Edge → Node. It uses a fluent, chainable Python API called Torque, allowing users to write graph queries as standard Python code without needing to learn a separate query language or use query strings. It supports bulk inserts via put_batch, JSON integration, and can be served over HTTP for remote access. Additionally, it integrates with SimSIMD for SIMD-optimized similarity searches using word embeddings.

Who it’s for

It is designed for Python developers who need a lightweight, serverless graph database for managing relationships, performing semantic searches, or building knowledge graphs within their applications.

Highlights

  • Embedded Architecture: No server setup required; runs entirely within the Python process.
  • Torque Query Language: A chainable Python API for intuitive graph traversal and filtering.
  • Vector Search: Built-in support for word embeddings (GloVe, Gensim) and k-nearest neighbor searches.
  • Flexible Data Loading: Supports importing data from CSV, N-Triples (RDF), and edgelist files.
  • Interactive Visualization: Integrated show() method for visualizing graphs in Jupyter notebooks and Google Colab.

Related

  • Project
  • Project
  • Project
  • Project
  • Project