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.3.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: rescalepy-0.0.3.tar.gz
  • Upload date:
  • Size: 8.3 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.3.tar.gz
Algorithm Hash digest
SHA256 c463dc8bf64ec71d7ede06507487a6283c9c8e587cc4954908959ea64fb8b31e
MD5 47cfabcc3a09bfdce76343307199e9a4
BLAKE2b-256 fe60484979f70300ae6b849b273343f7b7b22c8e89c34f873ab3ee5bac2d7e0c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rescalepy-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 738d9336b79e1be5b9138c8346af7f4a50575476f1229b4ae5495245caf176bf
MD5 4cf8a5df9058f75d0127bc89710ed7d3
BLAKE2b-256 7d9a98b79bcc04dbceaec8e132267b92a32f1e49dcb792c5880d0ab91b16fc6c

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