osmosis-driver-interface
💧 A membrane between the decentralized world and centralized world oceanprotocol.com
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
urlandconfig_file_path(optional). Note that config file is loaded from env varCONFIG_PATHif defined and takes precedence overconfig_file_path - If a config file is used and has a value for the
module.pathoption, then this path is used to load the osmosis driver regardless of theurl - If no
module.pathis defined, the driver module is automatically determined from theurlusing thedriver_mapas described above- The driver module name should follow the convention of
osmosis_<module-name>_driver
- The driver module name should follow the convention of
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.
Release files for osmosis-driver-interface 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| osmosis-driver-interface-0.1.0.tar.gz | 11.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| osmosis_driver_interface-0.1.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 24.7 kB
Release files / osmosis-driver-interface-0.1.0.tar.gz
| Download URL | osmosis-driver-interface-0.1.0.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b287ab8edeadf19039405fbc6674ee067348d545b531da60355191af290a1779
|
|
BLAKE2b-256 checksum How to use checksums |
ac0adde6465d5ea004e9d1139eedfe942a9c10934726c3c1c69ce04fe21e8c39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / osmosis_driver_interface-0.1.0-py2.py3-none-any.whl
| Download URL | osmosis_driver_interface-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
1451a8f2bc698d65dba11c25b39b9b7e9b4802702849b45086ef9cbaaad7d98b
|
|
BLAKE2b-256 checksum How to use checksums |
9393c206c392b5c3b4508028444028009375b843028dc95fda9d5708c9a61da0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|