Skip to content

Yoast/singer-tap-postmark

Repository files navigation

tap-postmark

This is a Singer tap that produces JSON-formatted data following the Singer spec.

This tap:

Step 1: Create an API key

Create an API key in Postmark

Step 2: Configure

Create a file called postmark_config.json in your working directory, following sample_config.json. The required parameters is the postmark_server_token.

This requires a state.json file to let the tap know from when to retrieve data. For example:

{
  "bookmarks": {
    "messages_opens": {
      "start_date": "2021-03-01"
    },
    "messages_outbound": {
      "start_date": "2021-03-01"
    },
    "stats_outbound_bounces": {
      "start_date": "2021-01-01"
    },
    "stats_outbound_clients": {
      "start_date": "2021-01-01"
    },
    "stats_outbound_overview": {
      "start_date": "2021-01-01"
    },
    "stats_outbound_platform": {
      "start_date": "2021-01-01"
    }
  }
}

Will replicate data from those dates. Please note that the messages endpoints start date can be at maximum 45 days in the past.

Step 3: Install and Run

Create a virtual Python environment for this tap. This tap has been tested with Python 3.7, 3.8 and 3.9 and might run on future versions without problems.

python -m venv singer-postmark
singer-postmark/bin/python -m pip install --upgrade pip
singer-postmark/bin/pip install git+https://github.com/Yoast/singer-tap-postmark.git

This tap can be tested by piping the data to a local JSON target. For example:

Create a virtual Python environment with singer-json

python -m venv singer-json
singer-json/bin/python -m pip install --upgrade pip
singer-json/bin/pip install target-json

Test the tap:

singer-postmark/bin/tap-postmark --state state.json -c postmark_config.json | singer-json/bin/target-json >> state_result.json

Copyright © 2021 Yoast

About

No description, website, or topics provided.

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages