API Reference

User API

User API is just one function, nothing more to worry about!

The typical usage is:

import lyricseek
lyricseek.get(artist='The Beatles', title='Let it be', request=('lyrics',))
lyricseek.get(artist=None, album=None, title=None, otherinfo=None, request=(), timeout=None, filename=None, analyzer='first_match', plugin_filter=None)

Get data about a song

Parameters:
  • otherinfo (dict) – Other metadata, not worthing a function parameter
  • request (tuple) – all needed metadata. If empty, all will be searched
  • timeout – timeout in seconds, None for no timeout
Return type:

dict

Developer API

This modules are meant to be used for internal developers, or for the user who know what he is doing.

_run

Main module: provide simple, ready-to-use functions to get lyrics

lyricseek._run.get_data(artist=None, album=None, title=None, otherinfo=None, request=(), timeout=None, filename=None, analyzer='first_match', plugin_filter=None)[source]

Get data about a song

Parameters:
  • otherinfo (dict) – Other metadata, not worthing a function parameter
  • request (tuple) – all needed metadata. If empty, all will be searched
  • timeout – timeout in seconds, None for no timeout
Return type:

dict

lyricseek._run.get_ready_retrievers(artist=None, album=None, title=None, otherinfo=None, request=(), timeout=-1, filename=None, filter_=None)[source]

Note

this is not meant to be used by the casual user. Use it if you are a developer or if you really know what you’re doing

This function will return an iterator over functions that take no arguments and will try to get data (that is, retrievers with arguments filled in)

Parameters:
  • otherinfo (dict) – Other metadata, not worthing a function parameter
  • request (tuple) – all needed metadata. If empty, all will be searched
  • timeout – currently not supported
Return type:

iterator

lyricseek._run.set_parallel(method)[source]

Allows to choose between process based and threading based concurrency

Parameters:method – can be ‘process’ or ‘thread’
Raises ValueError:
 If an invalid argument is given

pluginsystem

This module provides access to plugins, metadata and other tools

lyricseek._pluginsystem.get_plugins()[source]
Returns:name:class dict of plugins (if loaded)
lyricseek._pluginsystem.load_plugins()[source]

Searches for plugins, and load them into memory.

Todo

support plugin versions

lyricseek._pluginsystem.register_plugin(plugin)[source]

Warning

This is only intended for debug or dirty h4x. If unsure, you shouldn’t use this

Register a plugin. Useful to add Retrievers without packing proper eggs

Parameters:
  • name – The name of the plugin. In the standard case, this is the name of the entrypoint
  • plugin – the Retriever class implementing your plugin (must implement the interface described in Retrievers
Raises ValueError:
 

If the check on the plugin fails

Project Versions

Table Of Contents

Previous topic

Current status

Next topic

Plugin HOWTO