Skip to main content

dlt-community-sources

CI PyPI License: MIT Python 3.12+

Community-maintained dlt sources for various APIs. Install only what you need via extras.

Available Sources

Source Extra Description
App Store Connect app-store-connect Apple App Store Connect API
Twilio twilio Twilio SMS, Calls, Usage Records
Meta Ads meta-ads Meta (Facebook) Ads campaigns, ad sets, ads, and insights
NextDNS nextdns NextDNS logs and analytics
Microsoft Ads microsoft-ads Microsoft Advertising (Bing Ads) with certificate auth support
TikTok Ads tiktok-ads TikTok Marketing API (Business API)
Yahoo Ads Search yahoo-ads-search Yahoo Japan Ads Search API (SS) with MCC support

Installation

pip install dlt-community-sources[app-store-connect]

Or with uv:

uv add dlt-community-sources[app-store-connect]

Usage

import dlt
from dlt_community_sources.twilio import twilio_source

pipeline = dlt.pipeline(
    pipeline_name="twilio",
    destination="duckdb",
    dataset_name="twilio_data",
)

source = twilio_source(
    account_sid="your_account_sid",
    api_key_sid="your_api_key_sid",
    api_key_secret="your_api_key_secret",
    resources=["messages", "calls"],
)

load_info = pipeline.run(source)
print(load_info)

See each source's README for detailed usage and authentication options.

Features

All sources share these common features:

  • Incremental loading where applicable
  • Automatic token/auth refresh
  • Rate limit handling with exponential backoff
  • Works with any dlt destination

Error handling

Sources distinguish two kinds of resources:

  • Auxiliary resources (metadata: campaigns, ads, audiences, ...) skip expected client errors (HTTP 400/403/404) per endpoint — some APIs return 4xx for valid requests on accounts without certain features. Every skip is logged with the response body.
  • Primary resources (the fact data a source exists for: report, insights) never skip. Failures raise PrimaryResourceTerminalError (request rejected — retrying will not help; 4xx other than 408/429) or PrimaryResourceTransientError (timeout, rate limit, provider-side job failure), so a load never "succeeds" with silently missing data. Both mix in dlt's TerminalException / TransientException. Note that dlt wraps resource exceptions in PipelineStepFailed / ResourceExtractionError, so retry helpers that inspect only one level (such as dlt.pipeline.helpers.retry_load) cannot see the classification — use contains_terminal_exception, which walks the exception chain:
from tenacity import Retrying, retry_if_exception, stop_after_attempt
from dlt_community_sources._utils import contains_terminal_exception

for attempt in Retrying(
    stop=stop_after_attempt(3),
    retry=retry_if_exception(lambda e: not contains_terminal_exception(e)),
    reraise=True,
):
    with attempt:
        pipeline.run(source)

To load a subset of resources, either pass the source-specific resources argument or use dlt's native selection: source.with_resources("report").

Operating in production

Lessons from running these sources on daily schedules:

  • Isolate failures per account. When one runner processes many accounts/advertisers (one dlt.pipeline per account), wrap each account — and each discovery call — in its own try/except, collect failures, and exit non-zero at the end. A single account's terminal failure (e.g. an account put on hold by the provider) should not abort the remaining accounts, and one discovery failure (e.g. an MCC your API user is not invited to yet) should not kill the whole job.
  • Tune connection retries for your network. dlt's requests client retries ConnectionError/Timeout with request_max_attempts=5 and request_backoff_factor=1 by default — it gives up in roughly fifteen seconds. If your egress path has transient blackouts, raise them via dlt config (environment variables RUNTIME__REQUEST_MAX_ATTEMPTS, RUNTIME__REQUEST_BACKOFF_FACTOR, RUNTIME__REQUEST_MAX_RETRY_DELAY).
  • Alert on job failures. With this library's fail-loud behavior, data loss shows up as a non-zero exit instead of a green run with missing rows — but only if something watches the exit status. Wire your scheduler's failure signal (e.g. Cloud Run Job completed_execution_count{result:failed}) to an alert before relying on it.

Development

# Fork the repository first, then:
git clone https://github.com/YOUR_USERNAME/dlt-community-sources.git
cd dlt-community-sources
uv sync --group dev
uv run pytest -v
uv run ruff check .

AI-assisted development

This repository is set up for AI coding assistants with two layers of AI context:

  • Project rules (.ai/rules.md) — coding conventions, testing patterns, and structure specific to this repo
  • dltHub AI workbench — dlt ecosystem knowledge, MCP server, and guided skills for pipeline development

Both are synced to tool-specific locations (Claude Code, Cursor, Codex, etc.) via a single command:

bash scripts/sync-ai-rules.sh

The dltHub workbench provides an MCP server for source search (9,700+ APIs), pipeline inspection, and data exploration — plus skills that guide you through the full pipeline development workflow. See CONTRIBUTING.md for details.

Edit .ai/ only for project rules, then re-run the sync script. CI checks that files are in sync.

Contributing

See CONTRIBUTING.md.

License

MIT

Download files

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

Source Distribution

dlt_community_sources-0.7.21.tar.gz (58.6 kB view details)

Uploaded Source

Built Distribution

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

dlt_community_sources-0.7.21-py3-none-any.whl (79.5 kB view details)

Uploaded Python 3

File details

Details for the file dlt_community_sources-0.7.21.tar.gz.

File metadata

  • Download URL: dlt_community_sources-0.7.21.tar.gz
  • Upload date:
  • Size: 58.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for dlt_community_sources-0.7.21.tar.gz
Algorithm Hash digest
SHA256 3056c2fd4b85b02d46084bf6d50855619c9412833dabe89e47d592e5429e3979
MD5 ae652d1f50f82dea934067a4ebccb11f
BLAKE2b-256 55071f70bae42beee55c0a9359c800471cee83a114ea22620d337796cde2588f

See more details on using hashes here.

Provenance

The following attestation bundles were made for dlt_community_sources-0.7.21.tar.gz:

Publisher: publish.yaml on ota2000/dlt-community-sources

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dlt_community_sources-0.7.21-py3-none-any.whl.

File metadata

File hashes

Hashes for dlt_community_sources-0.7.21-py3-none-any.whl
Algorithm Hash digest
SHA256 5f51bb7d69580b1a92462b2a67745a7e8731d3be357f3fa9c4b21e248f58d0a8
MD5 9e66f860fc036eade3c8d1cbf4bf48bf
BLAKE2b-256 c77ba91966762c92af7851ee9bdbadd7dad69f320c95e1723f232cacde4a4cb8

See more details on using hashes here.

Provenance

The following attestation bundles were made for dlt_community_sources-0.7.21-py3-none-any.whl:

Publisher: publish.yaml on ota2000/dlt-community-sources

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.8.0

2 files

This release

0.7.21 This release

2 files

0.7.20

2 files

0.7.19

2 files

0.7.18

2 files

0.7.17

2 files

0.7.16

2 files

0.7.15

2 files

0.7.14

2 files

0.7.13

2 files

0.7.12

2 files

0.7.11

2 files

0.7.10

2 files

0.7.9

2 files

0.7.8

2 files

0.7.7

2 files

0.7.6

2 files

0.7.5

2 files

0.7.4

2 files

0.7.3

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.4

2 files

0.6.3

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.1

2 files

0.4.0

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page