Categories

Versions

Python Library

Rapidminer® software provides a Python library on GitHub that allows you to interact with Rapidminer products from Python. You can collaborate with others using the Rapidminer repository, run processes from Python scripts, and leverage the scalable infrastructure of Rapidminer® AI Hub software.

The rapidminer Python library will be useful in these use-cases:

  • you work locally on the same data in Rapidminer and in Python.
  • you need to reuse business logic that exists in a Rapidminer process in Python.
  • you develop Python code snippets that you may later use in a Rapidminer process. You can access the input data directly from your local Rapidminer repository without any additional export / import step.
  • you are using Python primarily, but want to collaborate with colleagues using the Rapidminer platform. You can easily share any kind of data via the Rapidminer AI Hub repository.
  • you plan to leverage the scalable Rapidminer AI Hub infrastructure directly from Python.
  • you want to call a deployed Real-Time Scoring service directly from Python.

If you are working with Notebooks inside Rapidminer AI Hub, the library is already provisioned to cover most of the use cases mentioned above.

Installation

You can install the library using the Python package manager pip with a simple one-liner:

pip install rapidminer

Usage

For the latest usage examples, refer to the tutorial notebook provided with Notebooks, or explore the examples on GitHub.

Authentication

To connect to Rapidminer AI Hub, you need to provide credentials to authenticate with the server. The following inputs are required:

  • authentication_server: The URL of the Keycloak authentication server, including the /auth postfix.
  • offline_token: After logging into the Rapidminer AI Hub instance with the appropriate permissions, you can retrieve your offline token from the {Rapidminer AI Hub URL}/get-token page.
  • client_secret: The client secret is available on the same page for the token-tool client.

To fully automate the execution, you can provide these credentials along with additional parameters. For more details, please refer to the official documentation.

Here’s a basic example of how to connect to Rapidminer AI Hub:

import rapidminer
connector = rapidminer.Server("https://myserver.mycompany.com:8080",
    authentication_server="https:///myserver.mycompany.com:8081/auth",
    offline_token="qwert12345",
    client_secret="qwert12345")

This example demonstrates how to establish a connection to the server using the necessary authentication details.