Skip to content

Plugin interface for the Nanowire data processing plugin system

License

Notifications You must be signed in to change notification settings

SpotlightData/nanowire-plugin-py

Repository files navigation

Nanowire Plugin Interface

Build Status

This is the Python library for receiving data in a Nanowire pipeline. This library provides a wrapper around the nanowire controller API. It allows the user to easily create new plugins. NOTE: It is recommended to start by using the Nanowire Python Plugin Skeleton if you are intending to make a new plugin instead of using this library from scratch.

Installation

Library is on PyPI: https://pypi.python.org/pypi/nanowire-plugin

pip install nanowire-plugin

Usage

from nanowire_plugin.single_file_tools import bind

def my_analysis(jsonld, metadata, url):
    # perform analysis

    return result

bind(my_analysis)

Callback function parameters:

  • metadata: a copy of the Nanowire Metadata Object (for source.misc access)
  • jsonld: the JSON-LD document to mutate
  • url: a URL pointing to the task's source file

Result is a dict object with the mutated JSON-LD document.

About

Plugin interface for the Nanowire data processing plugin system

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages