Installing and Enabling the Python Module in HQ
Overview
Installing and enabling the Python module offers power capabilities in HQ for creating and managing custom pipeline steps, custom connectors and more. This module provides advantages and flexibility for organizations seeking to tailor their geospatial data workflows. Here's a detailed description of the benefits:
Advantages
Custom Workflow Logic
Python modules allow users to define bespoke logic within their pipelines and connectors that enables to create conditional operations, custom transformations, or data enrichment steps tailored to specific business needs that can apply to their own internal data.
Seamless Integration with External Systems
You can easily integrate custom pipelines and connectors with external APIs, databases, or file systems. This is useful for automating data exchange between HQ and other enterprise systems (e.g., asset management, analytics platforms).
Access to Python’s Rich Ecosystem
Python offers a vast ecosystem of libraries (e.g.,
pandas
,geopandas
,requests
,shapely
) for data processing, geospatial analysis, and automation. These libraries can be leveraged to perform complex operations directly in HQ.
Improved Automation and Efficiency
Reduces the need for manual data handling outside the HQ platform leading to more efficient workflows, fewer errors, and better scalability.
Flexibility
Modular Design: Python steps can be added, removed, or modified without affecting the rest of a pipeline, enabling agile development and iteration.
Reusable Code: Custom Python functions or classes can be reused across different pipelines and connectors which promote maintainability and consistency.
Parameterization: Python steps can be designed to accept parameters from HQ or preceding steps, supporting interactive and user-driven workflows.
Logging and Debugging: Built-in logging capabilities make it easier to trace and debug issues in pipeline and connector execution.
Step-by-Step Guide
How to Check if the Module is Enabled
/py directory in your HQ home
Windows: the default home location is C:\Users\<user>\AppData\Roaming\Voyager\hq
Linux and Mac: the default home location is ~/.voyager/hq
How to Install the Python Module if the Directory is Missing
During HQ installation, enable the python module by checking the box next to Python Plugin
NOTE: Once the installation process of HQ begins, you will see that it will install the Python packages
Go to Voyager Dev Builds and under Python Envs, download the bundle for the respective operating system (Windows, Linux Ubuntu or RHEL) and latest Python version (3.7 or 3.12)
Click the download button for the desired Python version and operation system under the Python Envs
After the
.zip
file has been downloaded, extract its contents and place the resulting file in the/py
directory that corresponds to the selected download option
Go to https://dl.voyagersearch.com/ and install the Python Plugin for the respective HQ version
Click the download button for the latest version of the Python Plugin
Once the download is complete for the
.dat
file, then store it in the/py
directory based on the download option selected
For the dev setup, go to the code base checkout and navigate to app/discovery/build.gradle
includeapi project(':plugin-python')
in the build and rebuild the project. Run the HQ and you’ll discover the directory created in the HQ folder as shown below:
You have successfully installed and enabled the python module, you can now begin using it for your customization workflows in HQ.