Skip to main content

Singer tap for the Hotmart API, built with the Meltano Singer SDK.

Project description

tap-hotmart

PyPI version Python License Singer SDK

A Singer tap for the Hotmart API, built with the Meltano Singer SDK.

Extracts sales, subscriptions, commissions, and product data from Hotmart and delivers it as a standard Singer stream — ready to load into any data warehouse (Postgres, BigQuery, Snowflake, etc.) or consumed by any Singer-compatible target.

Relationship with hotmart-python

This tap is built on top of hotmart-python, a Python SDK for the Hotmart API maintained by the same author. Both projects are developed in tandem:

  • hotmart-python handles authentication, pagination, retry, rate limiting, and API model definitions
  • tap-hotmart handles Singer protocol compliance: schema emission, incremental state, and record extraction

Whenever hotmart-python adds support for a new Hotmart API endpoint or model, a corresponding stream is added here. The two projects share the same release cadence.

Streams

Stream Replication Primary Key Description
transactions INCREMENTAL (approved_date) transaction Full sales history with buyer, product, payment, and fee details
subscriptions INCREMENTAL (accession_date) subscriber_code Subscription records with plan, status, and next charge date
commissions FULL_TABLE transaction Per-sale commission breakdown by role (producer, co-producer, affiliate)
products FULL_TABLE product_id Products registered in the account

Notes:

  • transactions and subscriptions are incremental: on each run, only records newer than the last bookmark are fetched.
  • commissions is full table because the Hotmart API does not expose a date field in commission responses, making reliable incremental extraction impossible. It is re-fetched in full on every run.
  • All incremental streams use automatic date chunking (30-day windows) to stay within Hotmart's per-request date range limits, so any start_date works without manual configuration.

Requirements

Installation

pip install tap-hotmart

Configuration

Create a config.json file:

{
  "client_id": "your-client-id",
  "client_secret": "your-client-secret",
  "basic": "Basic <your-base64-token>",
  "start_date": "2021-01-01T00:00:00Z",
  "sandbox": false
}
Setting Required Default Description
client_id Hotmart API Client ID
client_secret Hotmart API Client Secret
basic Basic <base64(client_id:client_secret)> — available directly in the Hotmart Developer Portal
start_date Earliest record date to sync (ISO 8601). Set to whenever you first started using Hotmart.
sandbox false Use the Hotmart sandbox environment

Note: The basic token is the Base64 encoding of client_id:client_secret. The Hotmart Developer Portal shows this value ready to copy — it starts with Basic .

Usage

# Discover available streams
tap-hotmart --config config.json --discover

# Sync all streams to stdout
tap-hotmart --config config.json

# Pipe to a Singer target
tap-hotmart --config config.json | target-jsonl --config target-config.json

# Incremental run with state
tap-hotmart --config config.json --state state.json \
  | target-postgres --config target-config.json \
  | tail -1 > state.json

Usage with Meltano

meltano add extractor tap-hotmart --variant im-voracity
meltano config tap-hotmart set client_id "your-client-id"
meltano config tap-hotmart set client_secret "your-client-secret"
meltano config tap-hotmart set basic "Basic <your-base64-token>"
meltano config tap-hotmart set start_date "2021-01-01T00:00:00Z"

meltano run tap-hotmart <your-target>

Development

git clone https://github.com/im-voracity/tap-hotmart
cd tap-hotmart
uv sync
uv run pytest tests/
uv run ruff check .
uv run mypy tap_hotmart/

To run tests against the live API, add a config.json with real credentials at the repo root. The test suite detects it automatically and runs the full Singer compliance suite (test_core.py) against the real API. Without config.json, all live tests are skipped and only unit/mock tests run.

Contributing

Bug reports and pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Author

Maintained by Matheus Tenório. Also the author of hotmart-python, the underlying SDK this tap depends on.

License

Apache 2.0

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_hotmart-1.0.0.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

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

tap_hotmart-1.0.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file tap_hotmart-1.0.0.tar.gz.

File metadata

  • Download URL: tap_hotmart-1.0.0.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tap_hotmart-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e386f27a7cca0138dfb1156e1abe248d6df78764db21df5c095fe88a4161ae8f
MD5 6a3a83b3e3dbd6855d6a5cdbae8cc6b5
BLAKE2b-256 161ee84c88205109bd1d725f899514b0498fafd205d4de405a771f778bf469bf

See more details on using hashes here.

File details

Details for the file tap_hotmart-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: tap_hotmart-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tap_hotmart-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5161b2afa1e077757b954fc45d0f945bad5d84a3b3d3f88f8209572d3c3337f8
MD5 a4fcb6b80ee744c67df8daf6dfaac7ec
BLAKE2b-256 fdd58da9739acfa9c2a21065435909d87455a4681e0346e317ce144a7e049675

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