Storage and database adapters available in project Thoth
Project description
This library provides a library called thoth-storages used in project Thoth. The library exposes core queries and methods for JanusGraph database as well as adapters for manipulating with Ceph via its S3 compatible API.
Installation and Usage
The library can be installed via pip or Pipenv from PyPI:
pipenv install thoth-storages
The library does not provide any CLI, it is rather a low level library supporting other parts of Thoth.
You can run prepared testsuite via the following command:
pipenv install --dev
pipenv run python3 setup.py test
# To generate docs:
pipenv run python3 setup.py build_sphinx
Automatically generate schema for Graph database
To automatically generate schema for the graph database from models defined in this module, run:
# Install dev dependencies which include goblinoid:
pipenv install --dev
# From root of this repository:
PYTHONPATH=. pipenv run goblinoid -m thoth.storages.graph.models -i ALL_MODELS
# Or to directly adjust used schema:
export PYTHONPATH=.
# Or export also ../goblinoid to have the most recent Goblinoid version (devel from master).
export PYTHONPATH=.:../goblinoid
pipenv run goblinoid -m thoth.storages.graph.models -i ALL_MODELS --output-file ../janusgraph-thoth-config/scripts/init.groovy --index-file ../janusgraph-thoth-config/scripts/indexes.groovy.template
After running this command, there will be present file called init.groovy which is generated automatically from models stated in ALL_MODELS (see file thoth/storages/graph/models.py) as well as with indexes as configured in the indexes.groovy.template (placed into a single file to run it in one transaction).
See goblinoid for more info on how to configure models generation.
Known Issues
Gremlin queries are hanging:
When using
aiogremlin==3.3.1
(despite being not part of our specification, it might happen that another library overrides that dependency), gremlin queries might hang indeffinitely without throwing any error in Jupyter Notebooks. Make sure to check that correct version ofaiogremlin
is installed.
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
File details
Details for the file thoth-storages-0.9.7.tar.gz
.
File metadata
- Download URL: thoth-storages-0.9.7.tar.gz
- Upload date:
- Size: 29.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f90734d6b022f4d46b24604b7b64bdf9a5675e161f35047d3f64196876a8efd |
|
MD5 | dc977767a78c9b972d48c50003de7d28 |
|
BLAKE2b-256 | 596b5cfa9c4100948f6c9c4b68bfa229a9481dfe5aad5d1912c7f0e3782edd6f |