CodernityDB-HTTP is build from 2 layers

  • A CodernityDB wrapper
  • A full client-side interface build with KnockoutJS

All informations, suggestions etc that are valid for CodernityDB are valid for CodernityDB-HTTP also.

By design it supports one database per server instance. But you can close database and open new one using the same server instance. The limitation is one server process == one active CodernityDB object


CodernityDB-HTTP is some kind of HTTP layer on top of CodernityDB. It’s not intended to be REST compatible or so. It just maps HTTP methods and params to CodernityDB internals, nothing more.

Server start

When server starts you don’t have to provide database path and sever port. Port can be chosen automaticaly by OS, and the database path (Config).

If you installed CodernityDB-HTTP you should have cdb_startserver script in $PATH. If not then just execute:

python server.py path/to/config.json

It will not deamonize, for that part you have to take care yourself (we suggest you to use supervisord)

Data types

Server supports different input/output data types, by default it uses application/json. If msgpack-python is found in the system, there will be other data type exposed: application/msgpack. The server will format response in the same type as the input data were. So you can switch between those in runtime, without any change in application. We strongly suggest msgpack instead of json because is much faster, products much smaller data.

Everything is obviously set by Content-Type HTTP header:

  • application/json, json will make server talk JSON to you, it will also expect JSON encoded incomming data.
  • application/msgpack, msgpack will make server talk Msgpack to you. it will also expect then Msgpack encoded incomming data.


You may also be interested in CodernityDB-PyClient which is client library for CodernityDB-HTTP that provides the same (really the same) interface as embedded CodernityDB. They both share the same tests codebase.


If you want to use msgpack please install msgpack-python, or msgpack-pure to make use of it.