Documentation Index
Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
Use this file to discover all available pages before exploring further.
What is the Atoti Limits Python extension
The Atoti Limits Python extension is a Spring Boot auto-configuration that connects an Atoti Python session to a running Atoti Limits server. It allows Python users to define limits against cubes created in Jupyter notebooks or Python applications. The extension includes two components:- Java extension: A JAR that configures the connection between the Atoti Python session and the Atoti Limits server.
- UI extension: A TypeScript/React extension that adds Atoti Limits functionality to the Atoti UI.
Compatible versions
| Atoti Limits version | Atoti Python version |
|---|---|
| 4.2.1 | 0.9.12 |
Prerequisites
- Java: 21 or higher
- Python: 3.10 or higher
- UV package manager: Latest version (installation guide)
- Atoti license: A valid Base64-encoded license set in the
ATOTI_LICENSEenvironment variable - A running Atoti Limits server
How the extension works
- A standalone Atoti Limits server starts and waits for a connection request.
- An Atoti Python session starts with the extension JAR loaded.
- After the cube is built and security is configured, a manual REST call triggers the connection.
- The extension sends connection information to the Atoti Limits server.
- The Atoti Limits server connects to the Atoti Python session and is ready to manage limits.
How to set up the extension
Step 1: Download the extension
Download the extension, which is available in the released artifacts accessible from this link.Step 2: Start a standalone Atoti Limits server
A running Atoti Limits server is required before the Python session can connect. The server must be configured to communicate with the Atoti Python session. See the getting started section for more details on building the Atoti Limits server. Start the server with the following command:activeviam.apps.inter-server-event-service.issuer.target-servers[0].namespecifies the name of the Atoti Python server, which isatotiby defaultactiveviam.apps.inter-server-event-service.issuer.target-servers[0].urlspecifies the URL of the Atoti Python server, which by default in the following Atoti Python session ishttp://localhost:7070
The extension expects the Atoti Limits server to be available on
http://localhost:3090 by
default. If it is not running on this URL, the connection will fail.Step 3: Extract the UI extension from the JAR
The UI extension is bundled inside the extension JAR. It must be extracted to a directory that the Atoti session can reference. Include the following function in your Atoti Python code to extract the UI extension to a temporary directory:Step 4: Configure and start the Atoti Python session
The Atoti Python session must be configured with the extension JAR, the UI extension path, and the server URLs. By default, the extension expects the Atoti Python server to be available onhttp://localhost:7070,
hence the use of prot 7070 in the following session. You can use the ATOTI_BASE_URL environment
variable to control the Python server URL.
The following example creates a session with the extension loaded:
Step 5: Include a slicing date hierarchy in the cube
Atoti Limits requires a slicing date hierarchy to evaluate limits at specific points in time. After creating the cube, ensure you have a slicing date hierarchy, for example with:Step 6: Configure user roles
User roles in the Python session must match the roles expected by the Atoti Limits server. This ensures proper authorization and workflow management. The following example configures users and roles that match the default Atoti Limits server configuration:ROLE_LIMITS: Provides access to Atoti Limits functionalityROLE_APPROVE_REJECT_LIMIT: Allows approving or rejecting limit changesROLE_EVALUATE_STRUCTURE: Allows triggering limit evaluationsROLE_PROCESS_INCIDENT: Allows processing limit breaches
Step 7: Trigger the connection
After both servers are running and the cube is built, the connection between them must be triggered manually with a REST call. The following example triggers and polls the connection:POST /limits/autoconfig/connect: Initiates the connection between the two serversGET /limits/autoconfig/connected: Returnstrueorfalseto indicate the connection status