🐳 Ocean DB driver interface(Python).
Project description
|banner|
.. raw:: html
<h1 align="center">
oceandb-driver-interface
.. raw:: html
</h1>
..
🐳 Ocean DB driver interface(Python).
.. |banner| image:: docs/imgs/repo-banner@2x.png
:target: https://oceanprotocol.com
.. image:: https://img.shields.io/pypi/v/oceandb-driver-interface.svg
:target: https://pypi.python.org/pypi/oceandb-driver-interface
.. image:: https://travis-ci.com/oceanprotocol/oceandb-driver-interface.svg?token=pA8zcB6SCxKW5MHpqs6L&branch=master
:target: https://travis-ci.com/oceanprotocol/oceandb-driver-interface
High-level, plugin-bound Ocean DB functions. You should implement a plugin class extending this module to connect with Ocean DB.
* Free software: Apache Software License 2.0
* Documentation: https://oceandb-plugin-system.readthedocs.io.
How to use it
-------------
Abstract interface for all persistence layer plugins.
Expects the following to be defined by the subclass:
* type - A string denoting the type of plugin (e.g. BigchainDB).
* write - Write an object in OceanDB
* read - Read the registry for a provided id
* update - Update an object in OceanDB
* delete - Delete the registry for a provided id
* list - List the elements saved in OceanDB
Once you have your plugin, the way to use it is the following:
You have to provide a configuration with the following information:
.. code-block:: python
[oceandb]
enabled=true # In order to enable or not the plugin
module=bigchaindb # You can use one the plugins already created. Currently we have mongodb and bigchaindb.
module.path= # You can specify the location of your custom plugin.
db.hostname=localhost # Address of your persistence.
db.port=9985 # Port of yout persistence database.
# If you choose bigchaindb you have to provide this:
secret= # A secret that serves as a seed.
db.namespace=namespace # Namespace that you are going to use in bigchaindb
db.app_id= # App id of your bigchaindb application.
db.app_key= # App key of your bigchaindb application.
# If you choose mongodb you have to provide this:
db.username=travis # If you are using authentication, mongodb username.
db.password=test # If you are using authentication, mongodb password.
db.name=test # Mongodb database name
db.collection=col # Mongodb collection name
..
Plugins availables
------------------
At the moment we have developed two plugins:
* Bigchaindb (https://github.com/oceanprotocol/oceandb-bigchaindb-driver)
* Mongodb (https://github.com/oceanprotocol/oceandb-mongodb-driver)
How to develop a plugin
-----------------------
To create a plugin you have to create a class called Plugin extending AbstractPlugin.
You could find an example in https://github.com/oceanprotocol/oceandb-bigchaindb-driver
.. raw:: html
<h1 align="center">
oceandb-driver-interface
.. raw:: html
</h1>
..
🐳 Ocean DB driver interface(Python).
.. |banner| image:: docs/imgs/repo-banner@2x.png
:target: https://oceanprotocol.com
.. image:: https://img.shields.io/pypi/v/oceandb-driver-interface.svg
:target: https://pypi.python.org/pypi/oceandb-driver-interface
.. image:: https://travis-ci.com/oceanprotocol/oceandb-driver-interface.svg?token=pA8zcB6SCxKW5MHpqs6L&branch=master
:target: https://travis-ci.com/oceanprotocol/oceandb-driver-interface
High-level, plugin-bound Ocean DB functions. You should implement a plugin class extending this module to connect with Ocean DB.
* Free software: Apache Software License 2.0
* Documentation: https://oceandb-plugin-system.readthedocs.io.
How to use it
-------------
Abstract interface for all persistence layer plugins.
Expects the following to be defined by the subclass:
* type - A string denoting the type of plugin (e.g. BigchainDB).
* write - Write an object in OceanDB
* read - Read the registry for a provided id
* update - Update an object in OceanDB
* delete - Delete the registry for a provided id
* list - List the elements saved in OceanDB
Once you have your plugin, the way to use it is the following:
You have to provide a configuration with the following information:
.. code-block:: python
[oceandb]
enabled=true # In order to enable or not the plugin
module=bigchaindb # You can use one the plugins already created. Currently we have mongodb and bigchaindb.
module.path= # You can specify the location of your custom plugin.
db.hostname=localhost # Address of your persistence.
db.port=9985 # Port of yout persistence database.
# If you choose bigchaindb you have to provide this:
secret= # A secret that serves as a seed.
db.namespace=namespace # Namespace that you are going to use in bigchaindb
db.app_id= # App id of your bigchaindb application.
db.app_key= # App key of your bigchaindb application.
# If you choose mongodb you have to provide this:
db.username=travis # If you are using authentication, mongodb username.
db.password=test # If you are using authentication, mongodb password.
db.name=test # Mongodb database name
db.collection=col # Mongodb collection name
..
Plugins availables
------------------
At the moment we have developed two plugins:
* Bigchaindb (https://github.com/oceanprotocol/oceandb-bigchaindb-driver)
* Mongodb (https://github.com/oceanprotocol/oceandb-mongodb-driver)
How to develop a plugin
-----------------------
To create a plugin you have to create a class called Plugin extending AbstractPlugin.
You could find an example in https://github.com/oceanprotocol/oceandb-bigchaindb-driver
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
Close
Hashes for oceandb-driver-interface-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e17130bcfe7f67ed978f33104176b2e78d21bfa576687cebd0dbf66eed18c7c |
|
MD5 | 4f07007ecf6c60492a93dcaf723baa8c |
|
BLAKE2b-256 | 57da1c32bd6512c84c555dc186e395e9c8ec2e1663be233e6e09a130192e6abe |
Close
Hashes for oceandb_driver_interface-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bbfc00c52e118f5d07a89624f65ba71f8ac912579cef5b1f21e393569d05abe |
|
MD5 | 350a2d0736fe2d559b747b6d0aa7006d |
|
BLAKE2b-256 | c22a9040e9e8a7b06c3a7cb61f86696ab92b3bb3502187cb0dd6a3bed7f3aee0 |