Skip to main content

Armada gRPC API python client

Project description

Armada Python Client


How To Use This Application


These instructions are intended for end-users. If you wish to develop against armada_client, please see our documentation on contributing

  1. Click on armada_client.
  2. Read the file CONTRIBUTING.md
  3. Click here get an overview of Armada client libraries

Python client wrapping the gRPC services defined in submit.proto and events.proto; allows for

  • submitting, cancelling, and re-prioritising jobs, and
  • watching for job events.

Build

Prerequisites:

For building the python client: In the repo level, run make python then cd client/python and lastly run pip install . to install the client from git with all necessary dependencies.

  1. pyenv
    • Sets up local python environment for supporting multiple python environments
    • Set up a local python 3.9 environment
  2. pip
    • Package is defined by pyproject.toml
    • pip install . will pull dependencies and install based on pyproject.toml
  3. tox
    • tox -e format will check formatting/linter for your code according to default black settings and flake8
    • tox -e py39 will run unit tests with your default python 3.9 environment
  4. Auto formatting
    • tox -e format-code will run black formatter on client and testing code.

CI

We use tox for running our formatting and testing jobs in github actions.

Testing

gRPC requires a server to start so our unit tests are not true unit tests. We start a grpc server and then our unit tests run against that server.

poetry run pytest tests/unit/test_client.py

This is just a simple test that starts a grpc server in the background and verifies that we can call the client.

Releasing

This is to be automated.

Manual Release:

Log into the Armada-GROSS account on PyPI. Generate the API tokens and copy those tokens to ~/.pypirc. poetry build poetry run twine upload dist/*

Project details


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

armada_client-0.2.0-py3-none-any.whl (69.4 kB view details)

Uploaded Python 3

File details

Details for the file armada_client-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: armada_client-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 69.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for armada_client-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bcb777bdc2228717ea1633caac632e03b9b2c390eae0cc978d8506a841dcf2e9
MD5 3fda921a91f39c7b05082c81ad6a5ed6
BLAKE2b-256 7c2daeeda45d56eb9a8d71412c51209946a9b6d13e6cf55c43bb351f1b8cb10d

See more details on using hashes here.

Supported by

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