Featured Products
Omegabundle for Xojo 2024 Products

Python scripting is now unified, enabling better solutions.

Pervasive Python Across All Valentina Products

With Valentina Release 14, Paradigma Software introduced unified JavaScript and Python engines in Valentina Reports, ValentinaDB Stored Procedures and Valentina Forms. Previously, different products used different engines which lead to some inconsistencies in how scripts were executed. Now, with a unified engine, the behavior is consistent and reliable across all parts.

The Python engine is now integrated with various aspects of Valentina Studio, including Forms and Scripts, Valentina Reports, and even the ValentinaDB engine itself. This enables a more powerful development experience by allowing you to leverage Python for various tasks.

Valentina Studio PRO Valentina Server Valentina Reports Valentina Forms
  • Visual Designer & Scripting: Reports
  • Visual Designer & Scripting: Forms
  • Test Stored Procedures Locally
  • Python Stored Procedures
  • Python User Defined Functions
  • Reports Server
  • ValentinaDB Server
  • Python for Scripting
  • Reports ADK for Xojo
  • Python for Scripting

 

Omegabundle for Xojo 2024 includes all of these tools: Valentina Studio PRO, Valentina Server Unlimited, Valentina Reports ADK for Xojo and ValentinaDB for Xojo.


Integrate Python Modules

Valentina Studio offers comprehensive Python integration for your scripts, including module support for:

  • built-in modules
  • third-party modules
  • custom modules

Valentina Studio's Python integration expands its capabilities by allowing you to utilize modules installed within virtual environments (venv). These isolated environments, created using tools like venv, keep project-specific dependencies separate from the system-wide Python installation. Valentina Studio can access modules installed within activated venv environments, enabling you to leverage specific libraries for your scripts without affecting other projects or the global Python environment. This ensures clean and organized development by allowing you to manage project dependencies independently.

Built-in Modules Third Party Modules Custom Modules

You can directly utilize built-in Python modules for various functionalities, such as sys.

import sys

As of Omegabundle for Xojo 2024, the number of built in Python modules is 164.

Open the complete list of modules

Install and use of third-party libraries. This grants access to specialized tools beyond the built-in modules.

An example of the installation of the Numpy library:

pip install numpy

After the installation you can start using a module, make sure to provide a path to the modules folder:

import sys
if '/path/to/site-packages/' not in sys.path:
    sys.path.append('/path/to/site-packages/')
 
import numpy as np
a = np.array([6, 7, 8])
The sys.path variable persists for the duration of the application’s runtime. Therefore, if you load modules from various locations, it is essential to ensure that the location of the current script is placed at the beginning of the list.

You can develop custom Python modules for improved code organization and reusability.

This combined approach allows you to leverage the vast Python ecosystem and create powerful, tailored scripts within Valentina Studio.

 

 Due to a Windows-specific implementation detail where binary packages depend on a Python DLL, and Python is built-in in VKernel, the dependency is not satisfied, and the package can't be loaded. Other platforms are not affected.

 


Signal-Slots for Python

Signal-slots for objects in Valentina Forms and Valentina Reports can be scripted with Python.

Signal Slot Editing in Valentina Forms

 


Built in Documentation

Valentina Studio has a built in developer documentation system that covers Python scripting. You will find general API information about automation of Valentina Studio as well as specific information for Python.

Valentina Studio API Documentation Python Specific Documentation
Valentina Studio API Documentation Valentina Studio Python API Documentation

 

 You can also find API specific documentation for Valentina Reports and Valentina Forms.