Skip to main content

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 Dgraph 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:

PYTHONPATH=. pipenv run python3 ./create_schema.py --output thoth/storages/graph/schema.rdf

After running this command, the RDF file describing schema will be updated based on changes in model.

from thoth.storages import GraphDatabase

# Also provide configuration if needed.
graph = GraphDatabase()
graph.connect()
graph.initialize_schema()

Running Dgraph locally

You can use docker-compose present in this repository to run a local Dgraph instance. It does not use TLS certificates (so you must not to provide GRAPH_TLS_PATH environment variable).

$ docker-compose up

After running the command above (make sure your big fat daemon is up using systemctl start docker), you should be able to access a local Dgraph instance at localhost:9080. This is also the default configuration for Dgraph’s adapter - you don’t need to provide GRAPH_SERVICE_HOST explicitly.

The provided docker-compose has also Ratel enabled for to have an UI for graph database content. To access it visit http://localhost:8000/.

The provided docker-compose uses volume mounted from /tmp. After you computer restart, the content will not be available anymore.

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

thoth-storages-0.14.6.tar.gz (35.5 kB view details)

Uploaded Source

Built Distribution

thoth_storages-0.14.6-py3-none-any.whl (56.8 kB view details)

Uploaded Python 3

File details

Details for the file thoth-storages-0.14.6.tar.gz.

File metadata

  • Download URL: thoth-storages-0.14.6.tar.gz
  • Upload date:
  • Size: 35.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/36.5.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.3

File hashes

Hashes for thoth-storages-0.14.6.tar.gz
Algorithm Hash digest
SHA256 6a74d926bbc2cb7b32d31f3e75ad3c121b68c7f5d79c40cbcebffb4dc314064b
MD5 c4382a878e02e3d156720be348aabe7f
BLAKE2b-256 ed37dd94e3927ea6cbedd270775d7b7cff75ac3b4d8962f247c5053cf6fbfae6

See more details on using hashes here.

File details

Details for the file thoth_storages-0.14.6-py3-none-any.whl.

File metadata

  • Download URL: thoth_storages-0.14.6-py3-none-any.whl
  • Upload date:
  • Size: 56.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/36.5.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.3

File hashes

Hashes for thoth_storages-0.14.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c73b328eec998f8837795bd125e68f23ca42dde5ec998c8e53fb6aca241211a6
MD5 3f2f82a0c06cc4b3df0e3a23256495ab
BLAKE2b-256 895bc44440296cff84fee7c9cc3f345f124bdfc7b07f6d2d4c20f489d92bb443

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page