Python Client for TerminusDB
TerminusDB Client Python
Python version of the TerminusDB client – for TerminusDB API and WOQLpy
Requirements
Installation
- TerminusDB Client can be downloaded form PyPI using pip:
python -m pip install terminusdb-client
This only includes the core Python Client (WOQLClient) and WOQLQuery.
If you want to use woqlDataframe:
python -m pip install terminusdb-client[dataframe]
if you are installing form zsh
you have to quote the argument like this:
python -m pip install 'terminusdb-client[dataframe]'
python -m pip install git+https://github.com/terminusdb/terminusdb-client-python.git
Usage
>>> from terminusdb_client import WOQLQuery, WOQLClient
>>> client = WOQLClient(server_url = "https://127.0.0.1:6363")
>>> client.connect(key="root", account="admin", user="admin")
>>> client.create_database("university", accountid="admin", label="University Graph", description="graph connect
")
{'@type': 'api:DbCreateResponse', 'api:status': 'api:success'}
>>> client.get_database("university", account="admin")
{'label': 'University Graph', 'comment': 'graph connecting students with their courses in the university', 'id':
'university', 'organization':