Skip to main content

GRPC python binding for the ArmoniK orchestrator API

Project description

ArmoniK.Api Python package

This folder contains the necessary scripts to generate the ArmoniK.Api Python package. Please note that while the package generation is platform dependent, the generated package should be compatible with Linux and Windows.

Install the Python Package from PyPI

At each release, we provide a prepackaged version of ArmoniK.Api available on PyPI here : https://pypi.org/project/armonik. To install the package to your current Python environment, you can use pip :

pip install armonik

Linux / WSL

How to generate

Requirements :

  • Python >= 3.7
  • Python3-venv
  • Pip3
  • Bash

If the python command doesn't link to python3 on your system, you may be able to install the package python-is-python3, which links python to python3.

To generate the package from sources, run the proto2python.sh script from its folder. You need to specify a directory where the virtual environment used for the build will be located. For example the following command will generate the packages and will create the build environment "pyvenv" in the current user's home directory:

./proto2python.sh ~/pyvenv

3 folders will be created :

  • generated : contains the source files used to create the package
  • build : contains the source files used to create the wheel package
  • pkg : contains the sdist and wheel packages

Instead of running the script you can install the armonik package in "editable" mode, allowing you to make changes to the source code, and the changes will be reflected immediately without reinstalling the package.

pip install -e ./packages/python

How to install the generated package

From this directory, use the following command:

pip install pkg/armonik*.whl

The generated package will be installed to your current python environment

Windows

Coming soon

Tests

Test Environment Setup

Before running tests, ensure the following setup steps are completed:

  1. Install Dependencies:
sudo apt install dotnet-sdk-6.0 jq
  1. Launch the Mock Server:

Verify that port 5000 is available (Armonik and the mock server communicate on the same port, uninstall armonik if necessary):

lsof -i :5000
  1. Launch the server from the project's root directory in a separate terminal:
cd packages/csharp/ArmoniK.Api.Mock
dotnet run

Test Environment Summary

The test environment utilizes a mock endpoint to assert if the ArmoniK service has been triggered. It leverages the requests library to query the /calls.json endpoint, examining the JSON response to validate the count of remote procedure calls made to specific services and methods

curl localhost:5000/calls.json | jq

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

armonik-3.15.2.dev1560.tar.gz (75.6 kB view details)

Uploaded Source

Built Distribution

armonik-3.15.2.dev1560-py3-none-any.whl (136.3 kB view details)

Uploaded Python 3

File details

Details for the file armonik-3.15.2.dev1560.tar.gz.

File metadata

  • Download URL: armonik-3.15.2.dev1560.tar.gz
  • Upload date:
  • Size: 75.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for armonik-3.15.2.dev1560.tar.gz
Algorithm Hash digest
SHA256 8b3ebf90c252a278dfb0c84b159966a913960a7659e42ed7ef34f3ab55d1a5f4
MD5 9ebf030b5596513539983da0f038d17a
BLAKE2b-256 61fcce7bf96155ed61cf51d1ee2833eaf3627f3640dead573bbddeffcf3cc67f

See more details on using hashes here.

File details

Details for the file armonik-3.15.2.dev1560-py3-none-any.whl.

File metadata

File hashes

Hashes for armonik-3.15.2.dev1560-py3-none-any.whl
Algorithm Hash digest
SHA256 f73b8f0da230b8a63482ac758d5947160da5faa959f1a6d5999c805afcd14704
MD5 9186e2c1969b747b58d6f760ff2d0b7a
BLAKE2b-256 509fe68f88788f3616efbbc31c5f23339e100669dcc23119253127726cb5dbbe

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page