Skip to main content

Python utilities for Gamayun

This is a package containing python utilities for writing Gamayun jobs. Main Gamayun repository can be found here.

Contents

Getting the package

Install the package with the following command:

pip3 install gamayun-utils

This package depends on gprcio, which needs C/C++ compilers installed on the system. Needed dependencies on Alpine are:

apk add --no-cache python3 \
&& apk add --no-cache gcc \
&& apk add --no-cache g++ \
&& apk add --no-cache libc-dev \
&& apk add --no-cache linux-headers \
&& apk add --no-cache python3-dev

Note that suggested way of using Gamayun is with Docker, so you don't have to install these dependencies locally. If you are using Docker, there is an image containing Gamayun and Gamayun Python utilities here.

See Gamayun main repo for more information and see example usage here.

Usage

This part documents the package API

Reporting results and errors

Functions for reporting results or errors from the script are following:

def report_result_with_strings_only(results)

This function is used when the result we want to report is a list of strings

def report_result_with_maps_only(results)

This function is used when the result we want to report is a list of maps

def report_result_with_maps_and_strings(mapResults, stringResults)

This function is used when the result we want to report is a list of strings and a list of maps

def report_error(error)

This function is used when we want to report error which will be forwarded through the notifier interface

Note that once result or error is reported for the script/gamayun-job, Gamayun will stop listening for results/errors for that job, so in entire job there should be only one call to any of the report functions.

Executing the script logic

There is a function with the following signature in this package:

def run_gamayun_script_logic(callback)

All the script logic should be placed in some function and that function should be given to run_gamayun_script_logic as argument as this will ensure that all uncought exceptions are caught and reported as errors to Gamayun.

So, a job script file should look something like this:

from gamayun_utils import report_result_with_maps_only
from gamayun_utils import report_error
from gamayun_utils import run_gamayun_script_logic

def script_logic():
    # place the script logic here
    if OK:
        report_result_with_maps_only(results)
    else:
        report_error(error)

run_gamayun_script_logic(script_logic)

Metadata

Release files for gamayun-utils 0.2.1.1

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

Source distribution (sdist)

Source distribution for gamayun-utils 0.2.1.1
File Size Uploaded Provenance Actions
gamayun-utils-0.2.1.1.tar.gz 7.4 kB Without provenance Details for gamayun-utils-0.2.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gamayun-utils 0.2.1.1
File Interpreter ABI Platform Actions
gamayun_utils-0.2.1.1-py3-none-any.whl Python 3 none any Details for gamayun_utils-0.2.1.1-py3-none-any.whl

Total release size: 14.9 kB

Release files / gamayun-utils-0.2.1.1.tar.gz

Download URL gamayun-utils-0.2.1.1.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
54ccedcafaae25b1c66848cb22a7bfdf3556631f24aad51281866c3e49469124
BLAKE2b-256 checksum
How to use checksums
aab6baaac15f2c8a807c1465b7c30acfa861b13955c03454f0c73eee7cfe6945
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

Release files / gamayun_utils-0.2.1.1-py3-none-any.whl

Download URL gamayun_utils-0.2.1.1-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08963a1147e01dfad90b4bbd7ba4fac717c8459945a36bf7663ff1e616dd407a
BLAKE2b-256 checksum
How to use checksums
cfcf18c87554a476ba8ddf355cbffce349433b3f475a69cc96b756acf84acef2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

Security for gamayun-utils 0.2.1.1

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.

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