A set of methods to manage the OpenModel Knowledge Base Management
Project description
OMIKB-toolbox: The OpenModel Knowledge-Base Tool-Box
A python class with methods to make working with OMIKB as easy as possible.
Features:
- allows to acces the knowledge base (KB) and other API services from within the user's own network, e.g. local desktop and the remote omi services
- allows to acces the knowledge base (KB) and other API services from within the omi jupyter hub network
- provide simple ways to check the status of services (for now supports only fuseki servers)
- Authenticate users seamlesly with the omi hub
How does it work
Once the user installes omikb, they need to configure an omikb.yml file and save it in their home folder. This will be read by omikb.
the user has to store the omi hub API key obtianed as described in the omi infrastructure project see omi docs on git hub for example.
once instantiated, omikb uses the API key to obtain an access key to the omi. This access key has a limited life span of 1 hour (can be extended if needed, please contact developers.)
Example
Here is a simple example, the same works on omi hub (https://hub.openmodel.app) or on your own machine running python.
- Open a session to the OMI default service which is now an Apache Jena Fuseki Sparql end point supporting the standard Sparql w3C RDF query language.
from omikb.omikb import kb_toolbox
...
kb=kb_toolbox()
...
this creates an instance, which contains all the information you need to access the service, provides of course you have logged in.
Now we can use things like kb.query("some sparql query"), or kb.update("some INSERT statement"), etc to seamlessly interact with the knowledge base
Installation
Install the package directly from GitHub:
pip install git+https://github.com/H2020-OpenModel/OMIKB-toolbox.git
to upgrade do:
pip install --upgrade git+https://github.com/H2020-OpenModel/OMIKB-toolbox.git
Developers guide and what next
currently, version 0.1 supports only one service, which is an apache jena fuseki end point, however, one can build support for other services by following the steps:
- copy the existing kb_toolbox class
- modify the methods according to the service end points as defined in omi
- add a services section to omikb.yml
for example, one can create remote access to OntoFlow or other services in a similar manner.
See the jupyter Notebook demo in doc folder
from omikb.omikb import kb_toolbox
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.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file omikb-0.0.2.tar.gz.
File metadata
- Download URL: omikb-0.0.2.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ecfa83423b8c02a9aa94a205e113bdf2b1b8d7a04bd51f9e870d7df61d029475
|
|
| MD5 |
30bb6e087c9b1cc3705896ee32a062b3
|
|
| BLAKE2b-256 |
8db5aca8a4e864f592a29d016fe79c7901ca2b29588e9ced27c66d81e48e9b84
|
File details
Details for the file omikb-0.0.2-py3-none-any.whl.
File metadata
- Download URL: omikb-0.0.2-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afe0fd1d79159e6fcdfb81340d30915e8c00b908ff1f27e9177d4eb7c034bcd9
|
|
| MD5 |
5fcc0b81c7fe94f5292ef2e632749f1c
|
|
| BLAKE2b-256 |
113a549accfc195352ac0796f76d58b1f1d2deb6741a0edac49230e00a91b248
|