skillfed

apache-flink

Apache Flink Python API

apache-flink v2.3.0 214.1K downloads/30d#9,423 on PyPI
Permissive license https://www.apache.org/licenses/LICENSE-2.0 Active released

What it is and what it does

Apache Flink is a distributed processing engine for stateful computations over both bounded (batch) and unbounded (streaming) data. The Python API allows you to build scalable data pipelines using either a high-level Table API (similar to SQL or working with tabular data) or a lower-level DataStream API for fine-grained control over state and time semantics. It runs in common cluster environments and executes computations at in-memory speed across any scale.

The package depends on a substantial stack: py4j for JVM interop, apache-beam, and data-handling libraries like numpy, pandas, and pyarrow. It supports Python 3.9–3.12 and has been in production use since first release in 2020. The Table API suits exploratory data analysis and relational queries, while the DataStream API targets complex stream processing use cases requiring explicit state management.

Use it for:

  • Real-time data processing pipelines that ingest, transform, and aggregate streaming events.
  • Large-scale batch ETL jobs that read, clean, and load data from distributed storage.
  • Machine learning pipelines that prepare and aggregate data for model training at scale.
  • Exploratory data analysis on large datasets using SQL-like queries via the Table API.
  • Stateful stream processing with windowing, joins, and complex event detection.
  • Data quality monitoring and anomaly detection on continuous event streams.

Worth the install?

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

Python API for Apache Flink that builds stateful batch and streaming data processing pipelines, offering both high-level Table API (SQL-like queries) and lower-level DataStream API for complex stream processing.

Yes, if you need a mature, production-grade distributed stream or batch processing framework in Python and can manage the JVM dependency and substantial runtime dependency footprint. Active maintenance, permissive license, and support for Python 3.9–3.12 make it solid for large-scale data pipelines. Not recommended for lightweight, single-machine workloads or if you want to avoid Java runtime overhead.

Install

apache-flink on PyPI

pip

pip install apache-flink

uv

uv add apache-flink

poetry

poetry add apache-flink

Installing apache-flink

Before you install

Medium install friction due to 16 runtime dependencies including py4j, apache-beam, numpy, pandas, and pyarrow. Actively maintained with recent release 54 days ago. Wheels available for Python 3.9–3.12 on macOS and Linux.

License in practice

Licensed under Apache License 2.0 (permissive), allowing commercial and private use with minimal restrictions.

Quickstart

pip install apache-flink

import py4j
# Define and execute streaming or batch job using Table API or DataStream API

Requires Java/JVM runtime; communicates with Flink via py4j. Minimum Python 3.9.

Verify before relying

  • Whether all 16 runtime dependencies are strictly required or conditionally installed based on use case.
  • Performance characteristics and scalability limits for typical workloads.
  • Whether the DataStream and Table APIs have feature parity or if one is significantly more mature.

Package facts

License https://www.apache.org/licenses/LICENSE-2.0 (permissive)
Python support supports the current Python release (>=3.9)
Install friction medium — platform-specific wheel
Runtime dependencies 16 — py4j, python-dateutil, apache-beam, cloudpickle, avro, pytz, fastavro, requests, protobuf, numpy, pandas, pyarrow, pemja, httplib2, ruamel.yaml, apache-flink-libraries
Maintenance actively maintained — 54 days since the last release
First released
Downloads 214,134/month — #9,423 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: apache_flink-2.3.0-cp310-cp310-macosx_10_9_x86_64.whl; apache_flink-2.3.0-cp310-cp310-macosx_11_0_arm64.whl; apache_flink-2.3.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl; apache_flink-2.3.0-cp311-cp311-macosx_10_9_x86_64.whl; apache_flink-2.3.0-cp311-cp311-macosx_11_0_arm64.whl; apache_flink-2.3.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl; apache_flink-2.3.0-cp312-cp312-macosx_10_9_x86_64.whl; apache_flink-2.3.0-cp312-cp312-macosx_11_0_arm64.whl; apache_flink-2.3.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl; apache_flink-2.3.0-cp39-cp39-macosx_10_9_x86_64.whl; apache_flink-2.3.0-cp39-cp39-macosx_11_0_arm64.whl; apache_flink-2.3.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Development Status :: 5 - Production/StableLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9

Tags

distributed stream processing pythonbatch and streaming data pipelinesstateful data processing frameworkreal-time data processing enginedatastream api pythonsql-like data querieslarge-scale data analysis
stream-processingdistributed-computingetl

More Distributed Computing packages

grpcio

gRPC Python is an HTTP/2-based RPC framework…

permissive · top 100 on PyPI

execnet

execnet lets you spawn and communicate with…

permissive · top 1,000 on PyPI

cloudpickle

Cloudpickle extends Python's standard pickle…

permissive · top 1,000 on PyPI

smart-open

Provides a unified, open()-compatible Python…

permissive · top 1,000 on PyPI

portalocker

Portalocker provides cross-platform file…

permissive · top 1,000 on PyPI

ray

Ray is a distributed computing framework that…

permissive · top 1,000 on PyPI

apache-flink-libraries

Bundles Apache Flink's required libraries for…

permissive · top 15,000 on PyPI

apache-beam

Apache Beam is a unified framework for defining…

permissive · top 5,000 on PyPI

pyspark

PySpark provides Python bindings to Apache…

permissive · top 1,000 on PyPI

pyspark-client

Python client for connecting to Apache Spark…

permissive · top 5,000 on PyPI

quixstreams

Quix Streams is a Python framework for building…

permissive · top 15,000 on PyPI

apache-airflow-providers-apache-flink

Provides Apache Airflow integration for Apache…

permissive · top 15,000 on PyPI

aws-cdk.aws-kinesisanalytics-flink-alpha

Provides AWS CDK constructs for defining and…

permissive · top 15,000 on PyPI

signalflow-client-python

A Python client library that connects to Splunk…

permissive · top 15,000 on PyPI

faust-streaming

Faust-streaming is a Python library for…

permissive · top 15,000 on PyPI

delta-spark

Provides Python APIs for Delta Lake, an…

permissive · top 1,000 on PyPI