Skip to content

fixdauto/tap-applovin

Repository files navigation

tap-applovin

tap-applovin is a Singer tap for applovin.

Built with the Meltano Tap SDK for Singer Taps.

Features

  • Leverages the report endpoint from the Applovin API in order to grab hourly summaries of ad performance by campaign, creative, country, and platform.
  • Configure the date range you want to grab data from using the report_range_days config variable.
  • Built with the Singer SDK for extensibility and Meltano compatibility.

Requirements

  • Python 3.9+

  • Applovin API key

  • Singer SDK

  • Meltano (optional, for pipeline orchestration)

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/tap-applovin.git
cd tap-applovin
  1. Install the dependencies:
poetry install
  1. Activate the Poetry virtual environment:
poetry shell

Configuration

  1. Create a config.json file with the following structure:
{
  "api_key": "YOUR_APPOVIN_API_KEY",
  "report_range_days": 30
}
  • api_key: Your Applovin API key.

  • report_range_days: Number of days of data to fetch (e.g., 30 for the last 30 days).

  1. Place config.json in the root directory or pass its path as an argument when running the tap.

Running the Tap

  1. Run the tap standalone:
poetry run python -m tap_applovin --config config.json
  1. Use with Meltano for pipeline orchestration:
  • Add the tap to your Meltano project:
meltano add extractor tap-applovin
  • Configure the tap in meltano.yml:
extractors:
  tap-applovin:
    config:
      api_key: YOUR_APPOVIN_API_KEY
      report_range_days: 30
  • Run the tap via Meltano:
meltano run tap-applovin target-your-target

Accepted Config Options

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

tap-applovin --about

Configure using environment variables

This Singer tap will automatically import any environment variables within the working directory's .env if the --config=ENV is provided, such that config values will be considered if a matching environment variable is set either in the terminal context or in the .env file.

Testing with Meltano

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

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

Now you can test and orchestrate using Meltano:

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

Customization

The streams.py file provides the main logic for fetching and processing data. Key points of customization include:

  • Columns: Update the columns list to fetch additional fields.

  • Date Range: Modify the date_range method to adjust date partitioning.

  • API Parameters: Customize the get_url_params method to include additional query parameters.

Development

  1. Install development dependencies using Poetry:
poetry install --with dev
  1. Run tests:
poery run pytest

SDK Dev Guide

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages