Skip to main content

a Python client library for the Rescale API

Project description

rescalepy

This is a Python client library for the Rescale API. It provides a simple way to interact with the Rescale API from your Python applications.

Installation

You can install the library using pip:

pip install rescalepy

Usage in scripts

To use the library, you need to create a client object and authenticate with the Rescale API. You can then use the client object to interact with the API.

Here is an example of how to use the library to create/submit an OpenFoam job on Rescale:

from rescalepy import Client

API_TOKEN = 'your-token'
client = Client(api_token=API_TOKEN)
job_id = client.create_job(
    name='OpenFoam Job',
    command='cd airfoil2D;./Allrun',
    software_code='openfoam_plus',
    input_files=['airfoil2D'], # can be files or directories
    version='v1712+-intelmpi',
    project_id='your-project-id',
    core_type='emerald_max',
)

client.submit_job(job_id)

CLI Usage

The library also provides a command line interface that you can use to interact with the Rescale API. You can use the CLI to create/submit jobs, monitor jobs, and download job outputs.

Here is an example of how to use the CLI to create/submit an OpenFoam job on Rescale:

python -m rescalepy submit "OpenFoam Job" "airfoil2D" \
--api-token "your-token" \
--software-code "openfoam_plus" \
--input-files "airfoil2D" \
--version "v1712+-intelmpi" \
--project-id "your-project-id" \
--core-type "emerald_max"

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

rescalepy-0.0.2.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

rescalepy-0.0.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file rescalepy-0.0.2.tar.gz.

File metadata

  • Download URL: rescalepy-0.0.2.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.8

File hashes

Hashes for rescalepy-0.0.2.tar.gz
Algorithm Hash digest
SHA256 63cdb49beba212ae04a5779af483d6311bb27e80fa17b08856affc11c9b454b6
MD5 1ecae3ea3468d457e9322f4e66930cac
BLAKE2b-256 45fc46532c512efd434235d13abab7fe46058289c18ff2eef93d415a5ac5c292

See more details on using hashes here.

File details

Details for the file rescalepy-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: rescalepy-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.8

File hashes

Hashes for rescalepy-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ce9ce84aa29730794a16aefa336e3d98aaa70125f8fda3935e587a91dd9f0ad0
MD5 561ab1a3457a00b8ebeac7a2d8fec044
BLAKE2b-256 64e41f6c63a30f030563bedfd02d7b7a34509ce09fb084d219f09f24510c583b

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