Skip to content

Singer tap for the Last.FM API using the Meltano Singer SDK.

Notifications You must be signed in to change notification settings

rabidaudio/tap-lastfm

Repository files navigation

tap-lastfm

tap-lastfm is a Singer tap for LastFM.

Built with the Meltano Tap SDK for Singer Taps.

Installation

pipx install git+https://github.com/rabidaudio/tap-lastfm.git@v0.1.1

Configuration

Accepted Config Options

  • api_key (required): The API key to authenticate against the API service.
  • usernames (required): A list of usernames to fetch data for.
  • start_date: The earliest record date to sync. Defaults to all data.
  • step_days: The number of days to scan through before emitting state. Defaults to 30.

A full list of supported settings and capabilities for this tap is available by running:

tap-lastfm --about

Source Authentication and Authorization

Last.fm requires an API key even to read public data. See directions on how to request an API key here.. At this time, the tap does not access any non-public data, so signatures and session keys are not required.

Usage

You can easily run tap-lastfm by itself or in a pipeline using Meltano.

Executing the Tap Directly

tap-lastfm --version
tap-lastfm --help
tap-lastfm --config CONFIG --discover > ./catalog.json

Developer Resources

Initialize your Development Environment

pipx install poetry
poetry install

Create and Run Tests

Create tests within the tap_lastfm/tests subfolder and then run:

tox -e pytest

You can also test the tap-lastfm CLI interface directly using poetry run:

poetry run tap-lastfm --help

Testing with Meltano

Note: This tap will work in any Singer environment and does not require Meltano. Examples here are for convenience and to streamline end-to-end orchestration scenarios.

Your project comes with a custom meltano.yml project file already created. Open the meltano.yml and follow any "TODO" items listed in the file.

Next, install Meltano (if you haven't already) and any needed plugins:

# Install meltano
pipx install meltano
# Initialize meltano within this directory
cd tap-lastfm
meltano install

Now you can test and orchestrate using Meltano:

# Test invocation:
meltano invoke tap-lastfm --version
# OR run a test `elt` pipeline:
meltano elt tap-lastfm target-jsonl

SDK Dev Guide

See the dev guide for more instructions on how to use the SDK to develop your own taps and targets.

About

Singer tap for the Last.FM API using the Meltano Singer SDK.

Resources

Stars

Watchers

Forks

Packages

No packages published