Skip to main content

💧 Osmosis driver interface. A membrane between the decentralized world and centralized world.

Project description

banner

osmosis-driver-interface

💧 A membrane between the decentralized world and centralized world oceanprotocol.com

Build Status PyPI GitHub contributors


Table of Contents


How this works

This driver interface allows a data service provider such as provider-py to work with any cloud backend such as Azure, AWS by using a driver that implements the osmosis interface.

The osmosis interface is defined in data_plugin.py and computing_plugin.py. After writing a new driver, add a mapping in driver_map.json to allow osmosis to identify urls that the new driver is suitable to work with. The driver_map must be defined in the environment variable OSMOSIS_DRIVER_MAP using one of these methods:

  • export OSMOSIS_DRIVER_MAP="/path/to/driver_map.json"
  • export OSMOSIS_DRIVER_MAP='{"core.windows.net": "azure", "ipfs://": "ipfs", "NewProtocol://": "driver-module-name"}'

Load a driver:

  • Create Osmosis instance by giving a url and config_file_path (optional). Note that config file is loaded from env var CONFIG_PATH if defined and takes precedence over config_file_path
  • If a config file is used and has a value for the module.path option, then this path is used to load the osmosis driver regardless of the url
  • If no module.path is defined, the driver module is automatically determined from the url using the driver_map as described above
    • The driver module name should follow the convention of osmosis_<module-name>_driver

Code style

The information about code style in python is documented in these two links python-developer-guide and python-style-guide.

Testing

Automatic tests are setup via Travis, executing tox. Our tests use the pytest framework.

New Version

The bumpversion.sh script helps to bump the project version. You can execute the script using {major|minor|patch} as first argument to bump the version accordingly.

License

Copyright 2018 Ocean Protocol Foundation Ltd.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

osmosis-driver-interface-0.1.0.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

osmosis_driver_interface-0.1.0-py2.py3-none-any.whl (13.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file osmosis-driver-interface-0.1.0.tar.gz.

File metadata

  • Download URL: osmosis-driver-interface-0.1.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.7

File hashes

Hashes for osmosis-driver-interface-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b287ab8edeadf19039405fbc6674ee067348d545b531da60355191af290a1779
MD5 1bf8dbca14d15d92267f9e874fbae189
BLAKE2b-256 ac0adde6465d5ea004e9d1139eedfe942a9c10934726c3c1c69ce04fe21e8c39

See more details on using hashes here.

File details

Details for the file osmosis_driver_interface-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: osmosis_driver_interface-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.7

File hashes

Hashes for osmosis_driver_interface-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1451a8f2bc698d65dba11c25b39b9b7e9b4802702849b45086ef9cbaaad7d98b
MD5 3df05cefd6a95a88f8f660800e971f30
BLAKE2b-256 9393c206c392b5c3b4508028444028009375b843028dc95fda9d5708c9a61da0

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