Skip to content

knime/knime-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

288a0b6 · Apr 4, 2025
Aug 30, 2024
Feb 24, 2020
Aug 5, 2024
Mar 28, 2023
Dec 16, 2024
Aug 29, 2024
Dec 19, 2024
Dec 19, 2024
Jan 29, 2025
Jan 24, 2025
Dec 19, 2024
Mar 11, 2025
Dec 19, 2024
Jan 29, 2025
Apr 4, 2025
Dec 19, 2024
Feb 21, 2025
Dec 19, 2024
Jan 1, 2025
Dec 19, 2024
Dec 19, 2024
Jan 29, 2025
Mar 5, 2024
Jan 28, 2025
Apr 4, 2025
Dec 9, 2024
Feb 28, 2024
Dec 8, 2023
Apr 11, 2023
Jan 24, 2007
Jun 20, 2023
Aug 6, 2024
Sep 18, 2017
Mar 9, 2023
Jan 31, 2023
Apr 2, 2025
Sep 18, 2017
Mar 18, 2024
Dec 18, 2024
Feb 11, 2025
Mar 28, 2023
Dec 9, 2024
Jul 29, 2022
Oct 26, 2020
Oct 26, 2020
Nov 27, 2024

Repository files navigation

KNIME® Python

Jenkins Quality Gate Status

This repository is maintained by the KNIME Team Rakete.

The KNIME Python Integration closes the gap between KNIME Analytics Platform and Python. It provides nodes to write and execute Python scripts and functionality to make use of Python in other parts of KNIME Analytics Platform.

The legacy Python integrations can be found at knime-python-legacy.

Content

This repository contains the source code for the KNIME Python Integration. The code is organized as follows:

  • org.knime.ext.py4j: OSGi Wrapper for py4j
  • org.knime.python3.py4j.dependencies: Additional dependencies of the OSGi Wrapper for py4j to make classes visible to the classloader of the py4j wrapper plugin
  • org.knime.python3: Core functionality for running Python code from KNIME AP
  • org.knime.python3.arrow: Functionality for transferring Arrow tables between KNIME AP and Python
  • org.knime.python3.arrow.types: Python implementation of special types
  • org.knime.python3.nodes: Framework for writing KNIME AP nodes in Python
  • org.knime.python3.scripting: Useful functionality for providing Python scripting in KNIME AP
  • org.knime.python3.scripting.nodes: Implementation of Python scripting nodes for KNIME AP
  • org.knime.python3.views: Library for creating node views in Python

Tests

Test the unit tests locally:

  1. Pip install pytest
  2. pytest

Test the unit tests locally and see the coverage:

  1. Pip install coverage
  2. coverage run -m pytest
  3. coverage report # to get a report
  4. coverage html # to transform report to an html site for better view

Additionally, you can enhance VS Code to see the coverage:

  1. Install the VS Code extension Coverage Gutters
  2. coverage xml (after you did coverage run -m pytest and coverage report; this transforms the report to xml, which is read by VS Code)
  3. Left bottom: click watch to see the coverage generally indicated

You can also test within VS Code:

  1. Setup a testing framework (e.g. pytest) by using the Testing icon at the left sidebar
  2. Regularly execute tests from there

Development Notes

Use the Ruff Formatter for Python files.

$ ruff format .

You can find instructions on how to work with our code or develop extensions for KNIME Analytics Platform in the knime-sdk-setup repository on BitBucket or GitHub.

Join the Community