Skip to main content

Python binding for OAR

Project description

Installation

pip install oarpy

Documentation

The documentation of latest release is available at: http://oarpy.readthedocs.io/en/latest/

Getting started

Submit

Run an OAR job that prints “Hello world”:

from oarpy.oarjob import submit

job = submit(command='echo "Hello word"', name='helloword',
             project='oarpy', core=1, gpu=False, walltime={'hours':2})
print(job)
job.wait()

if job.exit_code:
    print('Failed:\n{}'.format(job.stderr))
elif job.exit_code is None:
    print('Interrupted:\n{}'.format(job.stdout))
else:
    print('Succes:\n{}'.format(job.stdout))

job.remove_logs()

Only “command” is required, all other arguments are optional. See documentation for more fine-grained control with the JobFactory and Resource classes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for oarpy, version 0.1.0b2
Filename, size File type Python version Upload date Hashes
Filename, size oarpy-0.1.0b2.tar.gz (12.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page