Created
May 29, 2013 19:56
-
-
Save gourneau/5673323 to your computer and use it in GitHub Desktop.
Start Ion Torrent plugins via the API using a Python script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
#load config from your json files, and convert it to a python dict | |
config = {} | |
payload = {'plugin': ["HelloWorld"], "pluginconfig" : config } | |
headers = {'content-type': 'application/json'} | |
#the number is the primary key of the result to run the plugin on | |
r = requests.post("http://bebop.itw/rundb/api/v1/results/224/plugin/", data=json.dumps(payload), auth=('ionadmin', 'ionadmin'),headers=headers) | |
print r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment