TopicDB is a topic map-based graph (NoSQL) database
Project description
TopicDB is a topic map-based graph (NoSQL) database.
Why?
I build (story) worlds. TopicDB plays a crucial role in that endeavour: Interactive Scene Browser for Stories.
Feature Support
Pending
Installation
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')
MAP_IDENTIFIER = 1
TITLE = 'Topic Map'
DESCRIPTION = 'Default topic map'
print('Creating and initializing topic map')
SetTopicMap(DATABASE_PATH, MAP_IDENTIFIER, TITLE, DESCRIPTION).execute()
# 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(topic.first_base_name.name))
Documentation
Documentation will be available soon.
Tutorial
A tutorial will be available soon.
How to Contribute
Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).
Write a test which shows that the bug was fixed or that the feature works as expected.
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)
Improvements
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)
Improvements
Added functionality to delete associations (i.e., DeleteAssociation command class).
0.2.0 (2016-12-28)
Improvements
Provided OntologyMode (either strict or lenient).
Sanitized backing store (SQLite) indexes.
0.1.1 (2016-12-26)
Miscellaneous
Initial release on PyPI (https://pypi.python.org/pypi/topic-db).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.