Skip to main content

PineXQ Python Client

A hypermedia-based client for the DataCybernetics PineXQ platform.

This module contains the submodules:

  • core: A generic hypermedia client (HC) to work with siren hypermedia APIs Siren on GitHub

  • job_management: Specialized HC-object (HCO) implementations for the PinexQ Job-Management API (JMA).

Installation

Install from PyPI by running

pip install pinexq-client

Setup the Client

The hypermedia client uses HTTPX as a backend. To access the API you need to provide a pre-configured HTTPX-client with a valid API key for authentication. From The API key the user and permissions are derived so do not share the API key and store it securely.

To initialize the client parts must be supplied:

  • The API key (as header)
  • The API host as URL with port if required
from httpx import Client

from pinexq.client.job_management.enterjma import enter_jma
from pinexq.client.job_management.hcos.entrypoint_hco import EntryPointHco

client = Client(
    base_url="https://myapihost.com:80",
    headers={'x-api-key': '<SECRET_PAT>'}
)

# the client is now ready to be passed to function entering the API
entrypoint: EntryPointHco = enter_jma(client)

Using the API

Job-Management Interface

There is a convenience layer wrapping job-management-specific objects in interface classes for ease of use.

from pinexq.client.job_management.tool import Job
from pinexq.client.job_management.model import JobStates

job = (
    Job(client)
    .create(name="JobName")
    .select_processing(processing_step="step_function_name")
    .configure_parameters(param_name="value")
    .start()
    .wait_for_completion()
)
result = job.get_result()

Raw Hypermedia API

In the spirit of a hypermedia API you can also use low level calls to navigate the API, e.g. when features are not yet exposed in the convenience wrapper.

from pinexq.client.job_management.enterjma import enter_jma
from pinexq.client.job_management.hcos.entrypoint_hco import EntryPointHco
from pinexq.client.job_management.model import CreateJobParameters, SetJobTagsParameters

entrypoint: EntryPointHco = enter_jma(client)
# Get to jobs root
job_root = entrypoint.job_root_link.navigate()
# Create a new job
parameters = CreateJobParameters(name="Test Job")
job = job_root.create_job_action.execute(parameters).navigate()
# Edit the job's tags
job.edit_tags_action.execute(SetJobTagsParameters(tags=["test", ]))

...

Folder-sourced inputs (JMA API 11)

Job and template input SetFolderSource actions take a folder resource URL rather than a folder path. The folder must exist and belong to the job/template owner. JMA stores its current path as a snapshot; renaming the folder later does not retarget that snapshot.

from pinexq.client.job_management.model import SetDataSlotFolderSourceParameters

job.get_input_data_slots()[0].set_folder_source_action.execute(
    SetDataSlotFolderSourceParameters(
        folder_url=str(folder.self_link().get_url()), recursive=True
    )
)
# The template helper also accepts a Folder wrapper, link, or URL.
template.set_dataslot_folder_source(0, folder, recursive=True)

Use folder_url=None (or template.set_dataslot_folder_source(0, None)) for the owner's root. This sends explicit JSON null; omitting the field is rejected. Output-folder settings continue to accept paths, since output folders can be created when the job runs.

Action templates and cron triggers in folders (JMA API 10.2)

Action templates and cron triggers can be filed in folders like jobs, WorkData and processing steps. Filing only organizes them: jobs created from a template are not filed into the template's folder, and moving a trigger does not change its schedule or its templates.

Where a template's jobs go is a separate setting, set_job_folder(). The folder is created when a job is created if it does not exist, and the jobs' outputs follow the job's folder. None, an empty path or / means the root (the default).

from pinexq.client.job_management.tool import ActionTemplate, ActionTemplateQuery, Folder
from pinexq.client.job_management.tool.action_trigger import CronTrigger, CronTriggerQuery

automation = Folder(client).create(name="automation")
template = ActionTemplate(client).create(
    name="daily-report", description="", processing_step_url=step_url, folder=automation)
trigger = CronTrigger(client).create(
    title="nightly", description="", cron_expression="0 3 * * *", folder=automation)

template.set_job_folder("/automation/reports/")  # jobs created from the template go here
template.move_to_folder()  # the template itself back to the root
print(trigger.cron_trigger_hco.folder_path)  # /automation/

ActionTemplateQuery.create(client, folder="/automation/", folder_recursive=True).execute()
CronTriggerQuery.create(client, folder="/automation/").execute()

Folder contents list them in action_templates and action_triggers, and FoldableItemType.ACTION_TEMPLATE / FoldableItemType.ACTION_TRIGGER filter child folders.

Dated job folders (JMA API 10.4)

A template's job folder may contain date placeholders, filled in each time a job is created from it: {{date}}, {{date+N}} or {{date-N}} (N days, at most 365), each optionally followed by @ and a time zone. Without a time zone the date is UTC. Dates are written as yyyy-MM-dd.

template.set_job_folder("/automation/reports/{{date+1@Europe/Berlin}}/")
print(template.action_template_hco.job_folder)  # /automation/reports/{{date+1@Europe/Berlin}}/
# a job created at 00:30 on 2026-10-14 in Berlin goes to /automation/reports/2026-10-15/

An unknown placeholder, an offset beyond 365 days, an unknown time zone or a path that is not valid once filled in is refused with an ApiException naming the reason.

Metadata

Release files for pinexq-client 2.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for pinexq-client 2.4.0
File Interpreter ABI Platform
pinexq_client-2.4.0-py3-none-any.whl Python 3 none any Details

Release files / pinexq_client-2.4.0-py3-none-any.whl

Download URL pinexq_client-2.4.0-py3-none-any.whl
Size 112.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
389b0e24c1de74719e3b72ddeb7d88d51a8f180a6f6098ec2e2794d8f7c212c7
BLAKE2b-256 checksum
How to use checksums
95288811a23b63c436cc6947850c0b3871f85551fed8463159b4ff4a1c288533
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Security for pinexq-client 2.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.4.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page