Skip to main content

TopicDB is a topic map-based graph (NoSQL) database

Project description

TopicDB is a topic map-based graph (NoSQL) database.


I build (story) worlds. TopicDB plays a crucial role in that endeavour: Interactive Scene Browser for Stories.

Feature Support

  • Pending


TopicDB officially supports Python 3.3–3.6. To install TopicDB, simply:

$ pip install topic-db

First-Time Use

import os

from topicdb.core.commands.topic.gettopic import GetTopic
from topicdb.core.commands.topicmap.gettopicmap import GetTopicMap
from topicdb.core.commands.topicmap.settopicmap import SetTopicMap

DATABASE_PATH = os.path.join(os.path.dirname(__file__), 'test-topicmap.db')
TITLE = 'Topic Map'
DESCRIPTION = 'Default topic map'

print('Creating and initializing topic map')

# Rest of the code is for testing purposes (e.g., to verify that the topic map has been created
# and that the 'entry' topic can be retrieved.
print("\nGetting topic map")
topic_map = GetTopicMap(DATABASE_PATH, MAP_IDENTIFIER).execute()

print("Map identifier: [{0}]".format(topic_map.identifier))
print("Map title: [{0}]".format(topic_map.title))
print("Map description: [{0}]".format(topic_map.description))
print("Map entry topic: [{0}]".format(topic_map.entry_topic_identifier))

print("\nGetting entry topic")
topic = GetTopic(DATABASE_PATH, MAP_IDENTIFIER, 'genesis').execute()

print("Topic identifier: [{0}]".format(topic.identifier))
print("Topic 'instance of': [{0}]".format(topic.instance_of))
print("Topic (base) name: [{0}]".format(


Documentation will be available soon.


A tutorial will be available soon.

How to Contribute

  1. Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).
  2. Write a test which shows that the bug was fixed or that the feature works as expected.
  3. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS.

Release History

0.4.0 (2017-01-08)


  • Renamed GetAssociations command class to GetTopicAssociations.
  • Refactored topic map-related commands and models, including changes to the topic map definition (SQL).
  • Renamed several (important) variables for the purpose of improving clarity and consistency.

0.3.0 (2016-12-30)


  • Added functionality to delete associations (i.e., DeleteAssociation command class).

0.2.0 (2016-12-28)


  • Provided OntologyMode (either strict or lenient).
  • Sanitized backing store (SQLite) indexes.

0.1.1 (2016-12-26)


Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
topic_db-0.4.0-py3-none-any.whl (49.2 kB) Copy SHA256 hash SHA256 Wheel py3
topic-db-0.4.0.tar.gz (17.3 kB) Copy SHA256 hash SHA256 Source None

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