Skip to main content

Singer.io tap for extracting data from the buttondown API

Project description

tap-buttondown

A Singer tap for extracting data from the Buttondown API.

Installation

pip install tap-buttondown

Or run directly with uvx.

uvx tap-buttondown --help

# Example with CSV target
uvx tap-buttondown --config config.json | uvx --with setuptools target-csv

Configuration

Create a config.json file with your Buttondown API key:

{
  "api_key": "your_buttondown_api_key_here"
}

You can find your API key in your Buttondown dashboard.

Usage

Discover available streams

tap-buttondown --config config.json --discover

This will output a catalog of available streams in JSON format.

Run the tap

tap-buttondown --config config.json --catalog catalog.json

Or to use the default catalog:

tap-buttondown --config config.json

State management

To maintain state between runs (for incremental syncs):

tap-buttondown --config config.json --state state.json

Streams

Subscribers

The subscribers stream extracts subscriber data from your Buttondown newsletter.

Schema:

  • id (string): Unique subscriber ID
  • creation_date (datetime): When the subscriber was created
  • email_address (string): Subscriber email address
  • notes (string): Notes about the subscriber
  • metadata (object): Custom metadata
  • tags (array): Tags associated with the subscriber
  • referrer_url (string): Referrer URL
  • secondary_id (integer): Secondary identifier
  • type (string): Subscriber type (e.g., "unactivated", "regular", "undeliverable")
  • source (string): Source of the subscription
  • utm_campaign (string): UTM campaign parameter
  • utm_medium (string): UTM medium parameter
  • utm_source (string): UTM source parameter
  • referral_code (string): Referral code
  • avatar_url (string): Avatar URL
  • stripe_coupon (string, nullable): Stripe coupon
  • unsubscription_date (datetime, nullable): When the subscriber unsubscribed
  • churn_date (datetime, nullable): When the subscriber churned
  • undeliverability_date (datetime, nullable): When the subscriber became undeliverable
  • undeliverability_reason (string, nullable): Reason for undeliverability
  • upgrade_date (datetime, nullable): When the subscriber upgraded
  • unsubscription_reason (string): Reason for unsubscription
  • transitions (array): Transition history
  • ip_address (string): IP address
  • last_open_date (datetime, nullable): Last email open date
  • last_click_date (datetime, nullable): Last email click date
  • stripe_customer_id (string, nullable): Stripe customer ID
  • subscriber_import_id (string, nullable): Import ID
  • risk_score (number): Risk score
  • stripe_customer (object, nullable): Stripe customer data

Replication Method: INCREMENTAL Replication Key: creation_date

Emails

The emails stream extracts email data from your Buttondown newsletter.

Schema:

  • id (string): Unique email ID
  • creation_date (datetime): When the email was created
  • modification_date (datetime): When the email was last modified
  • publish_date (datetime, nullable): When the email was published
  • subject (string): Email subject line
  • body (string): Email body content
  • status (string): Email status (e.g., "draft", "sent", "scheduled")
  • slug (string): URL slug for the email
  • canonical_url (string): Canonical URL
  • email_type (string): Type of email (e.g., "public", "private")
  • image (string): Featured image URL
  • description (string): Email description
  • metadata (object): Custom metadata
  • source (string): Source of the email
  • secondary_id (integer, nullable): Secondary identifier
  • commenting_mode (string): Commenting mode setting
  • absolute_url (string): Absolute URL to the email
  • filters (object): Email filters
  • analytics (object, nullable): Email analytics data
  • template (object, nullable): Email template data
  • attachments (array): Email attachments
  • related_email_ids (array): Related email IDs
  • featured (boolean): Whether the email is featured
  • should_trigger_pay_per_email_billing (boolean): Pay-per-email billing flag

Replication Method: INCREMENTAL Replication Key: modification_date

Development

This project is managed with uv.

Setup

  1. Clone the repository
  2. Create a config.json file with your API key

Testing

# Discover streams
uv run tap-buttondown --config config.json --discover

# Run sync
uv run tap-buttondown --config config.json

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tap_buttondown-0.3.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tap_buttondown-0.3.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file tap_buttondown-0.3.0.tar.gz.

File metadata

  • Download URL: tap_buttondown-0.3.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.4

File hashes

Hashes for tap_buttondown-0.3.0.tar.gz
Algorithm Hash digest
SHA256 551934b6af410b7b464ce8e6d6c31bcf13647423b79ecd513210d6a320a65e47
MD5 6999685cb5bd98c259e1bf3675507f8f
BLAKE2b-256 7e0b68acc416c7c6493165065b8171ec650128ffbcb0f934d2f2bd599b0c8bf1

See more details on using hashes here.

File details

Details for the file tap_buttondown-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tap_buttondown-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d43979e817e142a295a398cd3d0efb0c69f1b237b620be08d477d10981f208d
MD5 d21d12cf50fcb0c54612b1c94eab0589
BLAKE2b-256 019a2002f87b1e1bd14c38efea09b1f3fc3faf5c190b916c14a65195f240667a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page