# Python data pipeline libraries

Python data pipeline libraries define, schedule, and run the steps that move and transform data. An orchestrator records each task's dependencies as a graph and starts a task only after its upstream tasks finish. These libraries let data teams run scheduled jobs that recover from failed steps.

## Popularity

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [Celery](#celery) | 54.1M | 29.2K | Nov 2026 | BSD-3-Clause |
| [Temporal](#temporalio) | 47.9M | 1.3K | Nov 2026 | MIT |
| [dbt-core](#dbt-core) | 25.1M | 14.2K | Nov 2026 | Apache-2.0 |
| [RQ](#rq) | 13.2M | 10.7K | Oct 2026 | BSD-2-Clause |
| [Dagster](#dagster) | 11.0M | 16.4K | Nov 2026 | Apache-2.0 |
| [Prefect](#prefect) | 8.8M | 24.2K | Nov 2026 | Apache-2.0 |
| [Apache Airflow](#airflow) | 6.5M | 47.5K | Nov 2026 | Apache-2.0 |
| [DVC](#dvc) | 1.8M | 16.0K | Mar 2026 | Apache-2.0 |

Downloads: PyPI, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[Celery](#celery) has the most monthly downloads in this comparison, at 54.1M, a count that covers every background job it runs.

## Capabilities

| Library | Python three ten installation | Configurable step retries |
| --- | --- | --- |
| [Celery](#celery) | Yes | Yes |
| [Temporal](#temporalio) | No | Yes |
| [dbt-core](#dbt-core) | Yes | Undocumented |
| [RQ](#rq) | Yes | Yes |
| [Dagster](#dagster) | No | Yes |
| [Prefect](#prefect) | No | Yes |
| [Apache Airflow](#airflow) | No | Yes |
| [DVC](#dvc) | Yes | Undocumented |

## Libraries

### Celery

[GitHub](https://github.com/celery/celery) · [PyPI](https://pypi.org/project/celery) · [Docs](https://docs.celeryq.dev/en/stable/)

Runs a distributed task queue.

- Downloads / mo: 54.1M
- Stars: 29.2K
- Last release: 5.7.0
- License: BSD-3-Clause
- Capabilities: [From the Celery docs](https://docs.celeryq.dev/en/stable/)

```sh
pip install celery
```

**paperless-ngx/paperless-ngx** (48.3K stars)

[paperless-ngx/paperless-ngx](https://github.com/paperless-ngx/paperless-ngx) 

```python
def split(
    doc_ids: list[int],
    pages: list[list[int]],
    *,
    delete_originals: bool = False,
    source_mode: SourceMode = SourceModeChoices.LATEST_VERSION,
    user: User | None = None,
    trigger_source: PaperlessTask.TriggerSource = PaperlessTask.TriggerSource.WEB_UI,
) -> Literal["OK"]:
    logger.info(
        f"Attempting to split document {doc_ids[0]} into {len(pages)} documents",
    )
    doc = Document.objects.select_related("root_document").get(id=doc_ids[0])
    pair = _resolve_root_and_source_doc(doc, source_mode=source_mode)

    consume_tasks = []

    try:
        outputs = [
            (
                [pdf_ops.PageSpec(page) for page in split_doc],
                partial(_scratch_path, f"{doc.id}_{split_doc[0]}-{split_doc[-1]}.pdf"),
            )
            for split_doc in pages
        ]
        filepaths = pdf_ops.build_pdfs(pair.source_doc.source_path, outputs)

        for idx, (split_doc, filepath) in enumerate(
            zip(pages, filepaths, strict=True),
        ):
            overrides: DocumentMetadataOverrides = (
                DocumentMetadataOverrides().from_document(doc)
            )
            overrides.title = f"{doc.title} (split {idx + 1})"
            if user is not None:
                overrides.owner_id = user.id
            if not delete_originals:
                overrides.skip_asn_if_exists = True
            logger.info(
                f"Adding split document with pages {split_doc} to the task queue.",
            )
            consume_tasks.append(
                consume_file.s(
                    input_doc=ConsumableDocument(
                        source=DocumentSource.ConsumeFolder,
                        original_file=filepath,
                    ),
                    overrides=overrides,
                ).set(headers={"trigger_source": trigger_source}),
            )

        if delete_originals:
            backup = release_archive_serial_numbers([doc.id])
            logger.info(
                "Queueing removal of original document after consumption of the split documents",
            )
            try:
                chord(
                    header=consume_tasks,
                    body=delete.si([doc.id]),
                ).on_error(
                    restore_archive_serial_numbers_task.s(backup),
                ).apply_async()
            except Exception:
                restore_archive_serial_numbers(backup)
                raise
        else:
            group(consume_tasks).delay()

    except Exception as e:
        logger.exception(f"Error splitting document {doc.id}: {e}")
        raise

    return "OK"
```

[src/documents/bulk_edit.py](https://github.com/paperless-ngx/paperless-ngx/blob/14252054a150595d89040a02cb510b9f43f4570b/src/documents/bulk_edit.py#L821-L894) · [More projects using Celery →](https://dashboard.exa.ai/playground/search?q=celery%20GitHub%20projects)

**Quickstart**

```python
from celery import Celery

app = Celery('tasks', broker='amqp://guest@localhost//')

@app.task
def add(x, y):
    return x + y

print(add.delay(2, 2).id)
```

From [tasks.py](https://docs.celeryq.dev/en/stable/getting-started/first-steps-with-celery.html)

### Temporal

[GitHub](https://github.com/temporalio/sdk-python) · [PyPI](https://pypi.org/project/temporalio) · [Docs](https://docs.temporal.io/docs/python)

Provides the Python SDK for Temporal.

- Downloads / mo: 47.9M
- Stars: 1.3K
- Last release: 1.36.1
- License: MIT
- Capabilities: [From the Temporal docs](https://docs.temporal.io/docs/python)

```sh
pip install temporalio
```

**Quickstart**

```python
import asyncio
from temporalio.client import Client

async def main():
    client = await Client.connect('localhost:7233')
    print(await client.count_workflows())

asyncio.run(main())
```

From [temporalio.client.Client.html](https://python.temporal.io/temporalio.client.Client.html) · [Find projects using Temporal →](https://dashboard.exa.ai/playground/search?q=temporalio%20GitHub%20projects)

### dbt-core

[GitHub](https://github.com/dbt-labs/dbt) · [PyPI](https://pypi.org/project/dbt-core) · [Docs](https://pypi.org/project/dbt-core/)

Builds analytics the way engineers build applications.

- Downloads / mo: 25.1M
- Stars: 14.2K
- Last release: 1.12.7
- License: Apache-2.0
- Capabilities: [From the dbt-core docs](https://pypi.org/project/dbt-core/)

```sh
pip install dbt-core
```

**astronomer/astronomer-cosmos** (1.3K stars)

[astronomer/astronomer-cosmos](https://github.com/astronomer/astronomer-cosmos) 

```python
def run_command(
    command: list[str], env: dict[str, str], cwd: str, callbacks: list[Callable] | None = None, **kwargs: Any  # type: ignore[type-arg]
) -> dbtRunnerResult:
    """
    Invokes the dbt command programmatically.
    """
    # Exclude the dbt executable path from the command. This step is necessary because we are using the same
    # command that is used by `InvocationMode.SUBPROCESS`, and in that scenario the first command is necessarily the path
    # to the dbt executable.
    cli_args = command[1:]
    macro_errors: list[str] = []
    # ``build_cmd`` puts flags on both sides of the subcommand — dbt global flags before it,
    # ``add_global_flags()``/``dbt_cmd_flags`` after it — so a positional check is not safe here.
    # dbt 2's ``dbtRunner`` rejects ``callbacks=`` with ``NotImplementedError`` and has no protobuf events to read.
    if "run-operation" in cli_args and not is_dbt_v2():
        callbacks = [*(callbacks or []), _collect_macro_errors(macro_errors)]
    # ``exclude_dags_folder_from_sys_path`` must enter *before* ``change_working_directory`` so it
    # resolves ``DAGS_FOLDER`` against the Airflow process cwd. A relative ``DAGS_FOLDER`` resolved
    # after the chdir would point at the dbt project dir and fail to strip the real DAGs folder.
    with exclude_dags_folder_from_sys_path(), change_working_directory(cwd), environ(env):
        logger.info("Trying to run dbtRunner with:\n %s\n in %s", cli_args, cwd)
        runner = get_runner(callbacks=callbacks)
        try:
            result = runner.invoke(cli_args)
        finally:
            # Reset dbt adapters to release semaphores (run on all exit paths)
            # See: https://github.com/astronomer/astronomer-cosmos/issues/2334
            _cleanup_dbt_adapters()

    _fill_missing_messages(result, macro_errors)

    return result
```

[cosmos/dbt/runner.py](https://github.com/astronomer/astronomer-cosmos/blob/9bc1fad676f59aeaa629c390cfd27df639826c4a/cosmos/dbt/runner.py#L162-L193) · [More projects using dbt-core →](https://dashboard.exa.ai/playground/search?q=dbt-core%20GitHub%20projects)

**Quickstart**

```python
from dbt.cli.main import dbtRunner

runner = dbtRunner()
result = runner.invoke(["run"])
print(result.success)

```

From [programmatic-invocations.md](https://github.com/dbt-labs/dbt/blob/bd46c78d600c8518b5b24be7338c035887054d40/core/dbt/cli/main.py)

### RQ

[GitHub](https://github.com/rq/rq) · [PyPI](https://pypi.org/project/rq) · [Docs](https://pypi.org/project/rq/)

Creates background jobs and processes them.

- Downloads / mo: 13.2M
- Stars: 10.7K
- Last release: 3.0.0
- License: BSD-2-Clause
- Capabilities: [From the RQ docs](https://pypi.org/project/rq/)

```sh
pip install rq
```

**getredash/redash** (28.9K stars)

[getredash/redash](https://github.com/getredash/redash) 

```python
def execute_job(self, job, queue):
    statsd_client.incr("rq.jobs.running.{}".format(queue.name))
    statsd_client.incr("rq.jobs.started.{}".format(queue.name))
    try:
        super().execute_job(job, queue)
    finally:
        statsd_client.decr("rq.jobs.running.{}".format(queue.name))
        try:
            job_status = job.get_status()
        except InvalidJobOperation:
            # The job's hash already expired, so its outcome is unknown. rq 1.x returned
            # None here, which counted as a failure; keep that.
            job_status = None
        if job_status == JobStatus.FINISHED:
            statsd_client.incr("rq.jobs.finished.{}".format(queue.name))
        else:
            statsd_client.incr("rq.jobs.failed.{}".format(queue.name))
```

[redash/tasks/worker.py](https://github.com/getredash/redash/blob/f561a53dc55eeb3f20615be951560dc78bb23f4c/redash/tasks/worker.py#L62-L78) · [More projects using RQ →](https://dashboard.exa.ai/playground/search?q=rq%20GitHub%20projects)

**Quickstart**

```python
from redis import Redis
from rq import Queue

job = Queue(connection=Redis()).enqueue(sum, [1, 2, 3])
print(job.id)
```

From [README.md](https://python-rq.org/docs/)

### Dagster

[GitHub](https://github.com/dagster-io/dagster) · [PyPI](https://pypi.org/project/dagster) · [Docs](https://docs.dagster.io)

Defines data assets and their dependencies, with partitioned materialization and orchestration.

- Downloads / mo: 11.0M
- Stars: 16.4K
- Last release: 1.13.30
- License: Apache-2.0
- Capabilities: [From the Dagster docs](https://docs.dagster.io)

**Strengths**

- **Tracks assets and upstream dependencies.** Asset definitions describe computed data and its upstream dependencies.
- **Backfills selected data partitions.** Launch a backfill for all partitions or a selected subset.

**Watch out for**

- **Schedules need a running daemon.** Run dagster-daemon alongside the deployment for schedules and sensors.
- **Backfills default to separate runs.** By default, each selected partition gets a separate run.

```sh
pip install dagster
```

**dagster-io/project-dagster-university** (148 stars)

[dagster-io/project-dagster-university](https://github.com/dagster-io/project-dagster-university) 

```python
@dg.asset(
    group_name="raw_files",
    kinds={"python"},
)
def taxi_zones_file() -> dg.MaterializeResult:
    """The raw CSV file for the taxi zones dataset. Sourced from the NYC Open Data portal."""
    raw_taxi_zones = requests.get(
        "https://community-engineering-artifacts.s3.us-west-2.amazonaws.com/dagster-university/data/taxi_zones.csv"
    )

    with open(
        constants.TAXI_ZONES_FILE_PATH, "wb", transport_params=smart_open_config
    ) as output_file:
        output_file.write(raw_taxi_zones.content)

    num_rows = len(pd.read_csv(BytesIO(raw_taxi_zones.content)))

    return dg.MaterializeResult(
        metadata={"Number of records": dg.MetadataValue.int(num_rows)}
    )
```

[dagster_university/dagster_and_dbt/src/dagster_and_dbt/defs/assets/trips.py](https://github.com/dagster-io/project-dagster-university/blob/96d8c8cc0c64a54d8fd2cff231af063383ec290a/dagster_university/dagster_and_dbt/src/dagster_and_dbt/defs/assets/trips.py) · [More projects using Dagster →](https://dashboard.exa.ai/playground/search?q=Real%20orchestration%20projects%20using%20dagster%20for%20data%20pipelines&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
from dagster import asset, materialize

@asset
def greeting():
    return 'Hello'

result = materialize([greeting])

```

From [asset_dependency.py](https://docs.dagster.io/api/dagster/assets)

### Prefect

[GitHub](https://github.com/PrefectHQ/prefect) · [PyPI](https://pypi.org/project/prefect) · [Docs](https://www.prefect.io/docs)

Orchestrates Python flows and tasks with retries, schedules and declared assets.

- Downloads / mo: 8.8M
- Stars: 24.2K
- Last release: 3.9.3
- License: Apache-2.0
- Capabilities: [From the Prefect docs](https://www.prefect.io/docs)

**Strengths**

- **Retries individual tasks.** Configure task retries to limit how much work repeats.
- **Tracks produced data assets.** Declare asset materializations and dependencies alongside task orchestration.

**Watch out for**

- **serve pauses schedules on exit.** Set pause_on_shutdown=False to keep schedules active after serve exits.
- **Asset events record declared intent.** Materialization success follows the underlying task's execution state.

```sh
pip install prefect
```

**prefect-archive/prefect-recipes** (260 stars)

[prefect-archive/prefect-recipes](https://github.com/prefect-archive/prefect-recipes) 

```python
@flow(name="Update ABC Snowflake Table", retries=2, retry_delay_seconds=900)
def abc_elt_flow(deptCode_list: List[int]) -> None:

    """Flow which
    1. Calculates the last successful load of data into Snowflake in order
    to set the correct start_time.
    2. Extracts the data since the start_time from ABC API into a df.
    3. If new data from ABC API, loads df into Snowflake table.

    Args:
        - deptCode_list: A list of dept IDs each referenced as a
        deptCode.
    """

    target_table = "ABC_TABLE"

    start_tms = get_start_time(target_table)

    df = extract_data_from_api(start_tms, deptCode_list)

    if isinstance(df, DataFrame):

        # clean column names for Snowflake
        df.columns = [col.replace(".", "_").upper() for col in df.columns]

        # create ddl
        ddl = "".join([col + " STRING, " for col in df.columns])[:-2]

        load_data_into_snowflake(df, target_table, ddl)
```

[flows-advanced/etl/elt-with-snowflake.py](https://github.com/prefect-archive/prefect-recipes/blob/ebc974b22430f8fceda609dd0d17663ab2008c01/flows-advanced/etl/elt-with-snowflake.py) · [More projects using Prefect →](https://dashboard.exa.ai/playground/search?q=Real%20orchestration%20projects%20using%20prefect%20for%20data%20pipelines&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
from prefect import task

@task
def add_integers(a: int, b: int) -> int:
    return a + b

result = add_integers(1, 2)

```

From [README.md](https://docs.prefect.io/v3/concepts/tasks)

### Apache Airflow

[GitHub](https://github.com/apache/airflow) · [PyPI](https://pypi.org/project/apache-airflow) · [Docs](https://airflow.apache.org/docs/)

Schedules and executes dependency graphs of tasks, with historical-run controls.

- Downloads / mo: 6.5M
- Stars: 47.5K
- Last release: 3.4.0
- License: Apache-2.0
- Capabilities: [From the Apache Airflow docs](https://airflow.apache.org/docs/)

**Strengths**

- **Creates historical DAG runs.** Create runs across past dates through the CLI or REST API.
- **Accepts cron schedules.** Set a cron expression for recurring DAG runs.

**Watch out for**

- **Retries can repeat database writes.** Use upserts instead of inserts to avoid duplicate rows during reruns.
- **Heavy DAG parsing slows scheduling.** Move database calls and heavy computations into tasks.

```sh
pip install apache-airflow
```

**astronomer/astronomer-cosmos** (1.3K stars)

[astronomer/astronomer-cosmos](https://github.com/astronomer/astronomer-cosmos) 

```python
def create_task_groups_based_on_folder(
    dag: DAG,
    node: DbtNode,
    parent_task_group: TaskGroup | None,
    task_groups: dict[str, TaskGroup],
    use_hierarchical_naming: bool = False,
) -> TaskGroup | None:
    """
    Generate the parent task group for the given node based on the node's file path. If a TaskGroup is given, it will
    be used as the parent group.

    When ``use_hierarchical_naming`` is True, groups are cached by their cumulative folder path, so that folders
    sharing a leaf name under different parents (e.g. ``staging/aurora`` and ``marts/aurora``) become distinct task
    groups instead of collapsing into the first one created. When False (default), groups are cached by the bare
    folder name, preserving the legacy behaviour — and the existing task-group ids that users may reference — at the
    cost of collapsing same-named folders. See https://github.com/astronomer/astronomer-cosmos/pull/2824.
    """
    task_group = None
    # Use ``Path.parts`` (OS-agnostic) rather than ``str(path).split("/")`` so folder grouping also
    # works on Windows, where ``str(Path(...))`` uses backslash separators.
    resource_file_path_parts = Path(node.original_file_path).parts[:-1]
    cumulative_path = ""
    for resource_file_path_part in resource_file_path_parts:
        cumulative_path = f"{cumulative_path}/{resource_file_path_part}" if cumulative_path else resource_file_path_part
        cache_key = cumulative_path if use_hierarchical_naming else resource_file_path_part
        if cache_key in task_groups:
            task_group = task_groups[cache_key]
        else:
            task_group = TaskGroup(dag=dag, group_id=resource_file_path_part, parent_group=parent_task_group)
            task_groups[cache_key] = task_group
        parent_task_group = task_group
    return task_group
```

[cosmos/airflow/graph.py](https://github.com/astronomer/astronomer-cosmos/blob/9bc1fad676f59aeaa629c390cfd27df639826c4a/cosmos/airflow/graph.py) · [More projects using Apache Airflow →](https://dashboard.exa.ai/playground/search?q=Real%20orchestration%20projects%20using%20apache-airflow%20for%20data%20pipelines&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```python
from datetime import datetime
from airflow.sdk import DAG
from airflow.providers.standard.operators.empty import EmptyOperator

with DAG('first_pipeline', start_date=datetime(2024, 1, 1), schedule=None) as dag:
    EmptyOperator(task_id='first_task')

if __name__ == '__main__':
    dag.test()
```

From [tutorial_taskflow_api.py](https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/debug.html)

### DVC

[GitHub](https://github.com/treeverse/dvc) · [PyPI](https://pypi.org/project/dvc) · [Docs](https://dvc.org/doc)

Manages code and data together, like Git for data scientists.

- Downloads / mo: 1.8M
- Stars: 16.0K
- Last release: 3.67.1
- License: Apache-2.0
- Capabilities: [From the DVC docs](https://dvc.org/doc)

```sh
pip install dvc
```

**krishnaik06/The-Grand-Complete-Data-Science-Materials** (9.2K stars)

[krishnaik06/The-Grand-Complete-Data-Science-Materials](https://github.com/krishnaik06/The-Grand-Complete-Data-Science-Materials) 

```python
def train_model():
    try:
        subprocess.run(["dvc", "repro"], check=True)
        st.write("Training successfully completed")
    except subprocess.CalledProcessError as e:
        st.error(f"Error running DVC repro: {e}")
```

[ML Projects/Indian-Coin-Detection/app.py](https://github.com/krishnaik06/The-Grand-Complete-Data-Science-Materials/blob/13c51daa79a1c81a29e2962c04c74a6462e5fcd1/ML%20Projects/Indian-Coin-Detection/app.py#L9-L14) · [More projects using DVC →](https://dashboard.exa.ai/playground/search?q=dvc%20GitHub%20projects)

**Quickstart**

```python
import subprocess

subprocess.run(['dvc', 'init', '--no-scm'], check=True)
subprocess.run(['dvc', 'stage', 'add', '-n', 'hello', '-o', 'hello.txt', 'echo hello > hello.txt'], check=True)
subprocess.run(['dvc', 'repro'], check=True)
```

From [README.md](https://dvc.org/doc/command-reference/repro)

## FAQ

### Which Python data pipeline library should I use?

[Airflow](#airflow) suits scheduled DAGs of tasks with controls for historical runs. [Dagster](#dagster) suits pipelines organized around data assets. [Prefect](#prefect) suits Python flows that need retries and tracked state.

### What is dbt Core?

[dbt Core](#dbt-core) lets analysts build SQL models the way engineers build applications. Its commands run the models and resources as a dependency graph.

### What is Celery in Python?

[Celery](#celery) is a distributed task queue that sends tasks through a broker to workers. It composes tasks into groups, chains, and chords.

### Dagster vs Airflow: which should I use?

[Dagster](#dagster) models a pipeline as data assets with dependencies, materializations, and typed metadata. [Airflow](#airflow) models it as a DAG of tasks that it schedules as task instances.

### Prefect vs Airflow: which should I use?

[Prefect](#prefect) runs Python flows and tasks with retries, schedules, and tracked runtime state. [Airflow](#airflow) schedules DAGs of tasks with controls for historical runs.

### What is Temporal in Python?

[Temporal](#temporalio) is a Python SDK for durable workflows that keep their history and call external activities.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best Python data pipeline libraries Apache Airflow Dagster Prefect Luigi code examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
