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',
    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.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

rescalepy-0.0.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rescalepy-0.0.1.tar.gz
  • Upload date:
  • Size: 8.0 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.1.tar.gz
Algorithm Hash digest
SHA256 78d18be5ca2b0694729eafa6db78bd834d993ce94808d8fb6caaa1c95eedfbcf
MD5 801529123352b2bb0cfa82da344485ef
BLAKE2b-256 622f297616917fd10219a620153e78092eb7d37d2c51120df67b5c6d040e045e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rescalepy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ee14619d64bb697a6271c5d9f03650af03e72b8720d875d0878cc9f834b172ef
MD5 14088caa80f73cdbba14758efa6d6e65
BLAKE2b-256 2aff6d1732b04ec6d264421e1df2d104009a611d0f1e51d8506236a5dc5ffbe2

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