Zero Setup
CogDB is designed to be easy to use and requires no external setup. There is no server to run, no Docker containers to manage, and no configuration files to edit. You simply install it and import it into your Python application.
Getting Started
You can get up and running with CogDB in minutes. Just install the package using pip:
pip install cogdbA Complete Example
Once installed, you can immediately start creating graphs and adding data. Because CogDB is an embedded database, it runs directly within your Python process.
from cog.torque import Graph
# Create a graph and add data
g = Graph("social")
g.put("alice", "follows", "bob")
g.put("bob", "follows", "charlie")
g.put("bob", "status", "active")
# Query the graph
g.v("alice").out("follows").all()
# {'result': [{'id': 'bob'}]}
Why Embedded?
By removing the need for a standalone server, CogDB is an excellent fit for:
- Research, prototyping, and exploratory work.
- Interactive analysis in Python notebooks.
- Scripts or small to medium-sized services that need graph traversal without the overhead of running a heavyweight graph database.