Skip to main content

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/*

Metadata

Release files for cloudrift 0.46.3

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

Source distribution (sdist)

Source distribution for cloudrift 0.46.3
File Size Uploaded
cloudrift-0.46.3.tar.gz 8.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for cloudrift 0.46.3
File Interpreter ABI Platform
cloudrift-0.46.3-py3-none-any.whl Python 3 none any Details
cloudrift-0.46.3-2-py3-none-any.whl Python 3 none any Details
cloudrift-0.46.3-1-py3-none-any.whl Python 3 none any Details

Total release size: 37.5 kB

Release files / cloudrift-0.46.3.tar.gz

Download URL cloudrift-0.46.3.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
291a0852002f63e021bc8d32e2419604d8c393d65f700237f43abaaad2c7d3f1
BLAKE2b-256 checksum
How to use checksums
e4119a46e5cc97c63b9dafb5cd399b160739a8f7f23124c3fd4dcf3eaba592e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / cloudrift-0.46.3-py3-none-any.whl

Download URL cloudrift-0.46.3-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf3365cdcff32d35fdae760580d630d0dfb4cf2d553fc39861ce9bcf6f70282a
BLAKE2b-256 checksum
How to use checksums
553d39c4b3ff009a9c3def7b0f0f27481cff370bb1f6a65f978544fb8714ac50
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / cloudrift-0.46.3-2-py3-none-any.whl

Download URL cloudrift-0.46.3-2-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
792faee723496c5a3f9bdecb6a7fcaf5e43dc67c558d2a9a4d575dddfbad05bf
BLAKE2b-256 checksum
How to use checksums
f826d2887c2c9e0c06abeed6334b392a060387c6adf49085e771900b42f4d676
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / cloudrift-0.46.3-1-py3-none-any.whl

Download URL cloudrift-0.46.3-1-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
44b948debb616951923a89af60f229e553cd2b8e7e1037dcafaf208d0a4c0038
BLAKE2b-256 checksum
How to use checksums
a2ca12f187a21ff2eb1a6d75860c5ee8c15682b0b6945c3d5b55cd87f3428aed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.46.3 This release

4 release files

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