Skip to content

Instantly share code, notes, and snippets.

@juliedavila
Created October 16, 2015 15:12
Show Gist options
  • Save juliedavila/1560d83c70712e30205e to your computer and use it in GitHub Desktop.
Save juliedavila/1560d83c70712e30205e to your computer and use it in GitHub Desktop.
Lookup plugin boilerplate
class LookupModule(object):
def __init__(self, basedir=None, **kwargs):
self.basedir = basedir
def run(self, terms, inject=None, **kwargs):
if isinstance(terms, basestring):
terms = [ terms ]
ret = []
for term in terms:
# Most of the logic should go here
return ret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment