dlt
БесплатноБез исполняемых скриптовНе проверенdlt (data load tool) is an open-source Python library that loads data from APIs, files and databases into warehouses and lakes, inferring the schema and…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
dlt (Data Load Tool) — Python-First Data Ingestion
Overview
dlt is a Python library, not a service: a pipeline is a script that runs anywhere Python runs. You yield dictionaries from a function decorated with @dlt.resource, and dlt infers the schema, unnests nested JSON into child tables, tracks incremental cursors between runs and loads the result into a destination such as DuckDB, BigQuery, Snowflake, Postgres or a data lake. Standard REST APIs need no extraction code at all — the built-in rest_api source is configured with a dictionary.
Instructions
Installation
pip install "dlt[duckdb]" # library + destination driver
# Other destinations: "dlt[bigquery]", "dlt[snowflake]", "dlt[postgres]", "dlt[motherduck]"
dlt --version
dlt init rest_api duckdb # optional: scaffold rest_api_pipeline.py and .dlt/
dlt init writes .dlt/config.toml, an empty .dlt/secrets.toml, requirements.txt and a .gitignore that excludes secrets.toml.
Basic Pipeline
import dlt
import requests
# Simplest pipeline: Python generator → warehouse
@dlt.resource(write_disposition="append")
def github_events():
"""Load public events for a repository."""
response = requests.get("https://api.github.com/repos/dlt-hub/dlt/events")
response.raise_for_status()
yield from response.json()
pipeline = dlt.pipeline(
pipeline_name="github_events",
destination="duckdb", # or: postgres, snowflake, bigquery, motherduck
dataset_name="raw_github",
)
load_info = pipeline.run(github_events())
print(load_info) # Schema inferred automatically
With destination="duckdb" the data lands in github_events.duckdb in the working directory. Pipeline state and load packages are kept in ~/.dlt/pipelines/github_events.
Incremental Loading
@dlt.resource(
write_disposition="merge", # Upsert: update existing, insert new
primary_key="id",
)
def orders(
updated_at=dlt.sources.incremental(
"updated_at",
initial_value="2026-01-01T00:00:00Z"
)
):
"""Load orders incrementally — only new/changed since last run.
dlt stores the highest cursor value in pipeline state between runs.
"""
page = 1
while True:
response = requests.get("https://shop.northwind.dev/api/orders", params={
# start_value stays fixed for the whole run;
# last_value moves with every yielded page, so do not paginate on it
"updated_after": updated_at.start_value,
"page": page,
"per_page": 100,
})
response.raise_for_status()
data = response.json()
if not data:
break
yield data
page += 1
Write dispositions: append (default) for immutable events, replace for full refreshes, merge with a primary_key for entities that change.
REST API Source (Declarative)
import dlt
from dlt.sources.rest_api import RESTAPIConfig, rest_api_source
config: RESTAPIConfig = {
"client": {
"base_url": "https://api.github.com/repos/dlt-hub/dlt/",
"auth": {"type": "bearer", "token": dlt.secrets["sources.github.access_token"]},
},
"resource_defaults": {
"primary_key": "id",
"write_disposition": "merge",
"endpoint": {"params": {"per_page": 100}},
},
"resources": [
{
"name": "issues",
"endpoint": {
"path": "issues",
"params": {
"state": "all",
"since": "{incremental.start_value}",
},
"incremental": {
"cursor_path": "updated_at",
"initial_value": "2026-09-01T00:00:00Z",
},
},
},
{
# Child resource: one request per issue from the parent
"name": "issue_comments",
"endpoint": {"path": "issues/{resources.issues.number}/comments"},
"include_from_parent": ["id"],
},
],
}
pipeline = dlt.pipeline(
pipeline_name="github_issues", destination="duckdb", dataset_name="raw_github"
)
print(pipeline.run(rest_api_source(config)))
Pagination is detected from the first response. When detection fails, set paginator on the client or the endpoint: json_link (next_url_path), header_link, offset (limit, offset_param, total_path), page_number (base_page, total_path), cursor (cursor_path, cursor_param) or single_page. Use data_selector when the records sit under a key such as results.
Secrets and Configuration
dlt resolves every config value from environment variables first, then .dlt/secrets.toml and .dlt/config.toml. Sections are joined with a double underscore in environment variables:
export SOURCES__GITHUB__ACCESS_TOKEN="$GITHUB_TOKEN" # dlt.secrets["sources.github.
Установить dlt в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл dlt?
dlt (data load tool) is an open-source Python library that loads data from APIs, files and databases into warehouses and lakes, inferring the schema and tracking incremental state for you. Use when a user asks to build a data pipeline in Python, load a REST API into DuckDB, BigQuery, Snowflake or Postgres, set up incremental or merge loading, enforce a schema contract, or replace a hand-written ETL script or a hosted ELT connector.
Как установить скилл dlt?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл dlt запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic