Python Boilerplate contains all the boilerplate you need to create a Python package.
- Free software: Apache Software License 2.0
- Documentation: https://oceandb-plugin-system.readthedocs.io.
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"})
To create a plugin you have to create a class called Plugin extending AbstractPlugin.
You could find an example in plugins/mongo
- TODO
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.