Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Latest commit

 

History

History
38 lines (27 loc) · 1.06 KB

plugin.rst

File metadata and controls

38 lines (27 loc) · 1.06 KB

Plugins

pycoalaip requires a persistence layer plugin to be used in order to persist COALA IP entities to a distributed ledger, database, or file storage system.

Available Plugins

Writing a Plugin

Writing a plugin for pycoalaip is relatively simple. We use the pycoalaip-{plugin_name} naming scheme for plugin packages.

A plugin is expected to subclass from ~coalaip.plugin.AbstractPlugin and implement all the abstract methods and properties, following the API laid out in the ~coalaip.plugin.AbstractPlugin's documentation.

To make your plugin discoverable by name to pycoalaip, you should also set an entry point in your setup.py for the coalaip_plugin namespace. Taking the BigchainDB plugin as an example, this may look something like:

setup(
    ...
    entry_points={
        'coalaip_plugin': 'bigchaindb = coalaip_bigchaindb.plugin:Plugin'
    },
    ...
)