skillfed

petl

A Python package for extracting, transforming and loading tables of data.

petl v1.7.23 1.2M downloads/30d#4,289 on PyPI1,315
Permissive license MIT License Active released

What it is and what it does

petl is a Python library for building data pipelines using a declarative, chainable API. It lets you extract data from various sources, apply transformations (filtering, joining, aggregating, reshaping), and load results into different destinations. The library emphasizes composability: you build pipelines by chaining method calls, making complex transformations readable and maintainable.

The package works across Python 2.7 and Python 3.6 through 3.13. With no runtime dependencies, it installs cleanly and integrates easily into existing projects. It is actively maintained with recent releases and a stable community, making it suitable for ETL workflows where you need flexibility without the overhead of heavier frameworks.

Use it for:

  • Build data pipelines that read from files, filter and reshape rows, then write to a database
  • Join and aggregate data from multiple sources for reporting or analytics
  • Clean and normalize tabular data before feeding it into downstream workflows
  • Extract and transform subsets of large tables without loading everything into memory
  • Automate recurring data import and transformation tasks in batch jobs

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

petl extracts, transforms, and loads tables of data using a declarative, composable API that works with multiple data sources and formats.

Yes. petl is a solid, actively maintained library with zero dependencies, permissive licensing, and no known vulnerabilities. It fills a niche for straightforward ETL tasks, data cleaning, and pipeline automation. Install it if you need composable, readable data transformations without framework overhead.

Install

petl on PyPI

pip

pip install petl

uv

uv add petl

poetry

poetry add petl

Installing petl

Before you install

Low install friction with no runtime dependencies. Actively maintained with a recent release 9 days ago and steady community engagement (1315 GitHub stars).

License in practice

MIT License permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal restrictions.

Quickstart

pip install petl

import petl as etl

table = [{'id': 1, 'name': 'Alice'}, {'id': 2, 'name': 'Bob'}]
result = etl.wrap(table).cut('name').convert('name', str.upper)

Verify before relying

  • Whether the package supports streaming or lazy evaluation for very large datasets
  • Performance characteristics and typical use-case boundaries
  • Complete list of supported data sources and formats beyond those in the excerpt

Package facts

License MIT License (permissive)
Python support supports the current Python release (!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 9 days since the last release
Last repo commit
First released
Downloads 1,157,811/month — #4,289 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: petl-1.7.23-py3-none-any.whl

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Tags

etl pythonextract transform loaddata pipelinetable transformationdata loadingcsv json database etldata extraction tool
etldata-pipelinetable-processing

More Python Modules packages