Skip to main content

Graph Database based on Oracle BerkeleyDB (bsddb3)

Project description


Ajgu is graph database backed by Oracle Berkeley Database key/value store aka. bsddb. It’s meant to be an easy to use, just works persistent graph for people that want to experiment with graph databases. Somekind of SQLite for graph databases in Python.

The other purpose of Ajgu is to be able to create meta-graph or graph-proxy where some part of the graph are computed on the fly and cached in the database. This can be done at the application level, but not so much when you want your application data to be always fresh. If the data is required by several other applications, it leads to complicated problems that could be solved directly in the graph. This part is not written yet.

State of the project

  • Indexing is not done yet. You can create index on you own using another database.
  • Client/Server is in the work. Right now, prefork doesn’t work. You can have only one ajgu process accessing the database.
  • Querying in Client/Server is done with the API for embedded mode with a few changes. Have a lookt at ajgu/ and ajgu/

Development happens @



  • add example app
  • better error when magic keys is used but fails
  • fix bug where edge and vertex weren’t not saved
  • fix import error in tests

Getting started


  • python3
  • bsddb3
  • msgpack

Use python develop or pip install ajgu


See example directory on bitbucket:

A few pointers:

  • Everything happens in a transaction
  • So the transaction is very important
  • Vertex.outgoings and Vertex.incomings to jump to edges
  • Edge.start and Edge.end to jump to vertices
  • Properties can be get and set using the dict syntax
  • Magic properties work, so that you can access an element property with my_vertex.key instead of my_vertex['key']
  • For client/server have a look at ajgu/ and
  • They are a few tests in ajgu/ file
  • They are a others tests in ajgu/test_* files, they are not supposed to work :)


  1. What ajgu means?

    ajgu is a beam used in house construction in amazigh language.

  2. Why not use SQLite instead of bsddb3?

    SQLite offers less transaction semantic. I prefer to my data to be safe than the software to be fast.

  3. Where can I find a graph server with multi *thread* and *python querying*?

    GraphitiDB I never used it for the real. It’s relying on old version of Tinkerpop.

  4. Are GraphDBs useful beyond prototyping?

    You tell me!

  5. GraphDBs are awesome, where can I learn more?

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ajgu, version 15.6.10
Filename, size File type Python version Upload date Hashes
Filename, size ajgu-15.6.10.tar.gz (11.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page