Clone wiki

pyrant / Home

pyrant: A Pythonic implementation of Tokyo Tyrant protocol

Tokyo Cabinet is a fast and light-weight database library that manages a key-value store, and Tokyo Cabinet is a companion lightweight database server. The pyrant module provides a Pythonic interface, as well as a low-level interface, to the Tokyo Tyrant protocol, and allows for easy interfacing to a Tokyo Cabinet database from Python.

Example usage of the module (interfacing to a Tokyo Tyrant table database):

>>> import pyrant
>>> t = pyrant.Tyrant(host='', port=1978)
>>> t['key'] = {'name': 'foo'}
>>> print t['key']['name']
>>> del t['key']
>>> print t['key']
Traceback (most recent call last):
KeyError: 'key'


Find more information about Tokyo Cabinet and Tokyo Tyrant on:

Documentation for pyrant is available online at The official module versions are made avaliable at, but you are welcome to grab a snapshot of the source code from this repository. Note for all versions: Python 2.4+ is required.

The main purpose of this wiki is to support the continuous development of pyrant.

Developer ressources