You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
flink/flink-python
Alexander Alexandrov 8efa521887 [hotfix][table] Move JoinedRowData to utils subpackage 4 years ago
..
bin [hotfix][python] Fix the module name of the entrypoint in pyflink-udf-runner.bat (#13848) 4 years ago
dev [FLINK-16522][python] Add support of type hints 4 years ago
docs [FLINK-19114][python] Introduce Expression class for Python Table API 4 years ago
lib [FLINK-16304][python] Remove python packages bundled in the flink-python jar. (#11238) 5 years ago
pyflink [minor][python] Minor code cleanup 4 years ago
src [hotfix][table] Move JoinedRowData to utils subpackage 4 years ago
MANIFEST.in [FLINK-17471][python] Move the LICENSE and NOTICE file to the package root of the PyFlink source distribution. (#11956) 5 years ago
README.md [FLINK-19131][python] Add support of Python 3.8 in PyFlink 4 years ago
pom.xml [FLINK-19782][python] Remove antlr traces in flink-python 4 years ago
setup.cfg [FLINK-12962][python] Allows pyflink to be pip installed. 6 years ago
setup.py [FLINK-19131][python] Add support of Python 3.8 in PyFlink 4 years ago
tox.ini [FLINK-16522][python] Add support of type hints 4 years ago

README.md

Apache Flink

Apache Flink is a framework and distributed processing engine for stateful computations over unbounded and bounded data streams. Flink has been designed to run in all common cluster environments, perform computations at in-memory speed and at any scale.

Learn more about Flink at https://flink.apache.org/

Python Packaging

This packaging allows you to write Flink programs in Python, but it is currently a very initial version and will change in future versions.

In this initial version only Table API is supported, you can find the documentation at https://ci.apache.org/projects/flink/flink-docs-stable/dev/table/tableApi.html

The tutorial can be found at https://ci.apache.org/projects/flink/flink-docs-stable/tutorials/python_table_api.html

The auto-generated Python docs can be found at https://ci.apache.org/projects/flink/flink-docs-stable/api/python/

Python Requirements

Apache Flink Python API depends on Py4J (currently version 0.10.8.1), CloudPickle (currently version 1.2.2), python-dateutil(currently version 2.8.0), Apache Beam (currently version 2.23.0) and jsonpickle (currently 1.2).

Development Notices

Protobuf Code Generation

Protocol buffer is used in file flink_fn_execution_pb2.py and the file is generated from flink-fn-execution.proto. Whenever flink-fn-execution.proto is updated, please re-generate flink_fn_execution_pb2.py by executing:

python pyflink/gen_protos.py

PyFlink depends on the following libraries to execute the above script:

  1. grpcio-tools (>=1.3.5,<=1.14.2)
  2. setuptools (>=37.0.0)
  3. pip (>=7.1.0)

Running Test Cases

Currently, we use conda and tox to verify the compatibility of the Flink Python API for multiple versions of Python and will integrate some useful plugins with tox, such as flake8. We can enter the directory where this README.md file is located and run test cases by executing

./dev/lint-python.sh