eruizgar91 / oceandb_plugin_system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

oceandb-plugin-system

Documentation Status Updates

Python Boilerplate contains all the boilerplate you need to create a Python package.

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:

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

[oceandb]

enabled=true
#location of plugin class
module=mongo
module.path=plugins/
#plugin connection
db.hostname=localhost
db.port=27017
db.username=
db.password=
db.name=test
db.collection=protokeeper

Once you have defined this the only thing that you have to do it is use it:

oceandb = OceanDb(conf)
oceandb.write({"id": 1, "value": "test"})

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 plugins/mongo

Features

  • TODO

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

About

License:Other


Languages

Language:Python 84.9%Language:Makefile 15.1%