🐳 Mongo DB BigchainDB driver (Python).
Project description
|banner|
.. raw:: html
<h1 align="center">
oceandb-mongodb-driver
.. raw:: html
</h1>
..
🐳 `Mongo DB <https://www.mongodb.com/>`_ driver (Python).
.. |banner| image:: doc/img/repo-banner@2x.png
:target: https://oceanprotocol.com
.. image:: https://img.shields.io/pypi/v/oceandb-mongodb-driver.svg
:target: https://pypi.python.org/pypi/oceandb-mongodb-driver
.. image:: https://travis-ci.com/oceanprotocol/oceandb-mongodb-driver.svg?token=pA8zcB6SCxKW5MHpqs6L&branch=master
:target: https://travis-ci.com/oceanprotocol/oceandb-mongodb-driver
.. image:: https://readthedocs.org/projects/oceandb-mongodb-driver/badge/?version=latest
:target: https://oceandb-mongodb-driver.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
MongoDB driver to connect implementing OceanDB.
* Free software: Apache Software License 2.0
* Documentation: https://oceandb-mongodb-driver.readthedocs.io.
How to use it
-------------
First of all we have to specify where is allocated our config.
To do that we have to pass the following argument:
.. code-block:: python
--config=/path/of/my/config
..
If you do not provide a configuration path, by default the config is expected in the config folder.
In the configuration we are going to specify the following parameters to
.. code-block:: python
[oceandb]
[oceandb]
enabled=true # In order to enable or not the plugin
module=mongodb # 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 MongoDB.
db.port=9985 # Port of your Mongodb.
db.username=user # If you are using authentication, mongodb username.
db.password=password # If you are using authentication, mongodb password.
db.name=test # Mongodb database name
db.collection=col # Mongodb collection name
..
Once you have defined this the only thing that you have to do it is use it:
.. code-block:: python
oceandb = OceanDb(conf)
oceandb.write({"id": 1, "value": "test"})
..
.. raw:: html
<h1 align="center">
oceandb-mongodb-driver
.. raw:: html
</h1>
..
🐳 `Mongo DB <https://www.mongodb.com/>`_ driver (Python).
.. |banner| image:: doc/img/repo-banner@2x.png
:target: https://oceanprotocol.com
.. image:: https://img.shields.io/pypi/v/oceandb-mongodb-driver.svg
:target: https://pypi.python.org/pypi/oceandb-mongodb-driver
.. image:: https://travis-ci.com/oceanprotocol/oceandb-mongodb-driver.svg?token=pA8zcB6SCxKW5MHpqs6L&branch=master
:target: https://travis-ci.com/oceanprotocol/oceandb-mongodb-driver
.. image:: https://readthedocs.org/projects/oceandb-mongodb-driver/badge/?version=latest
:target: https://oceandb-mongodb-driver.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
MongoDB driver to connect implementing OceanDB.
* Free software: Apache Software License 2.0
* Documentation: https://oceandb-mongodb-driver.readthedocs.io.
How to use it
-------------
First of all we have to specify where is allocated our config.
To do that we have to pass the following argument:
.. code-block:: python
--config=/path/of/my/config
..
If you do not provide a configuration path, by default the config is expected in the config folder.
In the configuration we are going to specify the following parameters to
.. code-block:: python
[oceandb]
[oceandb]
enabled=true # In order to enable or not the plugin
module=mongodb # 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 MongoDB.
db.port=9985 # Port of your Mongodb.
db.username=user # If you are using authentication, mongodb username.
db.password=password # If you are using authentication, mongodb password.
db.name=test # Mongodb database name
db.collection=col # Mongodb collection name
..
Once you have defined this the only thing that you have to do it is use it:
.. code-block:: python
oceandb = OceanDb(conf)
oceandb.write({"id": 1, "value": "test"})
..
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-mongodb-driver-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68cea810824c5e2ae17f4a2aa52510d753dc6320ec743655fcdf3d58d93d7342 |
|
MD5 | fcb47b2e8ab869b48dbbbc808cc486a6 |
|
BLAKE2b-256 | 51fd43b5227bbd12def90ff5631d83e49abb5dcab810e3f7dee7f379852c1904 |
Close
Hashes for oceandb_mongodb_driver-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1ec63bba7f7bc48a6b26b4f4307cdd9a92394782e20f0a3102642d44a48f06e |
|
MD5 | 5d59caaabc8dda5f351909ce235abb05 |
|
BLAKE2b-256 | d8116019ce8d4cc83e683f06c4c9347217b1626c549e6c4f07cf20a75d80217d |