Skip to content

cloudruninc/cloudrun-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloudrun-python

Build Status GitHub issues

Official Python interface to Cloudrun API.

Installation

pip install git+https://github.com/cloudruninc/cloudrun-python

To run tests:

git clone https://github.com/cloudruninc/cloudrun-python
cd cloudrun-python
pytest -v cloudrun/tests.py

Example usage

Creating and starting a WRF run

from cloudrun import Run
import os

# Secret token
token = os.environ['CLOUDRUN_API_TOKEN']
url = 'https://api.cloudrun.co/v1'

run = Run(url, token)
run.create('wrf', '3.9.1')

# Upload input files
for input_file in ['namelist.input', 'wrfinput_d01', 'wrfbdy_d01']:
    run.upload(input_file)

# Start the run using 4 parallel cores
run.start(cores=4)

Contact us to obtain an API token.

Documentation

Full API documentation is available here.

Questions?

Need help integrating Cloudrun with your app or workflow? Let us know!

Releases

No releases published

Packages

No packages published

Languages