Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Example for using the mbed compile API
Prerequisites
- An account at developer.mbed.org (you will be asked for your password in order to compile) Get an account
- Python
- Python requests
On MacOS X you can install python requests as follows
install python requests on OS X
sudo easy_install requests
Usage
usage example for mbed API
python mbedapi.py --repo http://developer.mbed.org/users/dan/code/pubtest/ --user JonnyA --api http://developer.mbed.org --platform mbed-LPC1768 --destdir /tmp/ --debug 2
Revision 3:b71ebe79e1a5, committed 2015-07-03
- Comitter:
- stevep
- Date:
- Fri Jul 03 15:58:46 2015 +0100
- Parent:
- 2:09e9170d8a4e
- Commit message:
- Add task_id parameter to binary download
Changed in this revision
mbedapi.py | Show annotated file Show diff for this revision Revisions of this file |
--- a/mbedapi.py Mon Mar 02 15:25:34 2015 +0000 +++ b/mbedapi.py Fri Jul 03 15:58:46 2015 +0100 @@ -76,7 +76,11 @@ #now download if success: logging.info("Downloading your binary") - params = {'repomode': True, 'program': response['result']['data']['program'], 'binary': response['result']['data']['binary'] } + params = { + 'repomode': True, + 'program': response['result']['data']['program'], + 'binary': response['result']['data']['binary'], + 'task_id': uuid } r = requests.get(args.api + "/api/v2/tasks/compiler/bin/", params=params, auth=auth) destination = os.path.join(args.destdir, response['result']['data']['binary'])