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", ]))

...

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pinexq_client-1.9.0-py3-none-any.whl (86.4 kB view details)

Uploaded Python 3

File details

Details for the file pinexq_client-1.9.0-py3-none-any.whl.

File metadata

  • Download URL: pinexq_client-1.9.0-py3-none-any.whl
  • Upload date:
  • Size: 86.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for pinexq_client-1.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 034d403a826d3563ea74195ba2c45231eb4cf6751be24e28ea405380698b2487
MD5 5dadb7741f888901bc9d8cc1e7a754c4
BLAKE2b-256 747f32e271d7d93f8feeca8110d062706ee15e5c0c3af2cec73fb74ca4bd501a

See more details on using hashes here.

Release history Release notifications | RSS feed

1.11.0

1 file

1.10.0

1 file

This release

1.9.0 This release

1 file

1.8.0

1 file

1.7.4

1 file

1.7.3

1 file

1.7.1

1 file

1.7.0

1 file

1.6.0

1 file

1.5.1

1 file

1.5.0

1 file

1.4.1

1 file

1.4.0

1 file

1.3.0

1 file

1.2.1

1 file

1.2.0

1 file

1.1.0

1 file

1.0.0

1 file

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