Skip to main content

A Python client for FairCompute API

Project description

CloudRift Python Client

Rift is a Python client for CloudRift API. It allows to schedule jobs, monitor their status and retrieve results.

Creating CloudRift Account

To use CloudRift Python Client you need to have a CloudRift account. Please sign up at https://cloudrift.ai.

Launching a job

To launch a job, create a RiftClient instance and call run method.

from rift import AuthenticatedClient

client = AuthenticatedClient('https://cloudrift.ai', '<email>', '<password>')
client.run(image='alpine', command=['echo', 'hello cloudrift'])

Developing CloudRift

This section is for developers of CloudRift Python client library.

Prerequisites

Create virtual environment and install requirements.

python3 -m venv venv --prompt rift
source venv/bin/activate
pip install -r requirements.txt
pip install -e .

Testing

By default, testing is done against client running on localhost, so you need to start the server and at least one compute node locally. To start the server locally see https://github.com/faircompute/cloudrift#running-locally.

Project is using pytest for testing. To run all tests:

pytest

To run tests against remote server, set CLOUDRIFT_API_URL, FAIRCOMPUTE_USER_EMAIL and FAIRCOMPUTE_USER_PASSWORD environment variables:

CLOUDRIFT_API_URL="https://api.cloudrift.ai" FAIRCOMPUTE_USER_EMAIL=<email> FAIRCOMPUTE_USER_PASSWORD=<password> pytest

Uploading to PyPI

Please follow the instructions at https://packaging.python.org/tutorials/packaging-projects/

rm -rf dist
python3 -m build
python3 -m twine upload --repository testpypi dist/*
python3 -m 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 Distribution

cloudrift-0.46.3.tar.gz (8.5 kB view details)

Uploaded Source

Built Distributions

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

cloudrift-0.46.3-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

cloudrift-0.46.3-2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

cloudrift-0.46.3-1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file cloudrift-0.46.3.tar.gz.

File metadata

  • Download URL: cloudrift-0.46.3.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for cloudrift-0.46.3.tar.gz
Algorithm Hash digest
SHA256 291a0852002f63e021bc8d32e2419604d8c393d65f700237f43abaaad2c7d3f1
MD5 0b1d6648a74d64b3cb5fb9c0d87ff76b
BLAKE2b-256 e4119a46e5cc97c63b9dafb5cd399b160739a8f7f23124c3fd4dcf3eaba592e2

See more details on using hashes here.

File details

Details for the file cloudrift-0.46.3-py3-none-any.whl.

File metadata

  • Download URL: cloudrift-0.46.3-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for cloudrift-0.46.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bf3365cdcff32d35fdae760580d630d0dfb4cf2d553fc39861ce9bcf6f70282a
MD5 d848da48748f0be57173a5aa2093b9dc
BLAKE2b-256 553d39c4b3ff009a9c3def7b0f0f27481cff370bb1f6a65f978544fb8714ac50

See more details on using hashes here.

File details

Details for the file cloudrift-0.46.3-2-py3-none-any.whl.

File metadata

  • Download URL: cloudrift-0.46.3-2-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for cloudrift-0.46.3-2-py3-none-any.whl
Algorithm Hash digest
SHA256 792faee723496c5a3f9bdecb6a7fcaf5e43dc67c558d2a9a4d575dddfbad05bf
MD5 784972eddb22bb7b3b30a5d8878e1fed
BLAKE2b-256 f826d2887c2c9e0c06abeed6334b392a060387c6adf49085e771900b42f4d676

See more details on using hashes here.

File details

Details for the file cloudrift-0.46.3-1-py3-none-any.whl.

File metadata

  • Download URL: cloudrift-0.46.3-1-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for cloudrift-0.46.3-1-py3-none-any.whl
Algorithm Hash digest
SHA256 44b948debb616951923a89af60f229e553cd2b8e7e1037dcafaf208d0a4c0038
MD5 91cfc4e9b724c990025be83203990176
BLAKE2b-256 a2ca12f187a21ff2eb1a6d75860c5ee8c15682b0b6945c3d5b55cd87f3428aed

See more details on using hashes here.

Supported by

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