|
1 | | -# python-api |
2 | | -A Python-based API for Using Fox/RenderBus clound rendering service. |
| 1 | +# Fox/RenderBus cloud rendering Python API |
| 2 | +We provides a simple Python-based API for using our cloud rendering service. This is the official API that is maintained by Fox/RenderBus RD team. The API has been tested ok with python2.7.10 and requests 2.11.1 |
| 3 | + |
| 4 | +The latest version can always be found at |
| 5 | +https://github.com/renderbus/python-api |
| 6 | + |
| 7 | +## Submiting Step |
| 8 | + |
| 9 | +1. Login to our cloud server first. currently, some info like access_key need to ask us support team. |
| 10 | +```py |
| 11 | +fox = Fox(render_server="www5.renderbus.com", account="XXX", access_key="XXX", aspera_server="app5.renderbus.com", aspera_password="XXX") |
| 12 | +``` |
| 13 | + |
| 14 | +- Upload local files to cloud server, skip exists same files by default, you can upload the files and folders. |
| 15 | +```py |
| 16 | +fox.upload(path_list=[r"v:\project\shot\lgt.ma", r"v:\project\asset\sourceimages]) |
| 17 | +``` |
| 18 | + |
| 19 | +- After all the dependancy files of Maya file has been uploaded, you can submit task to cloud server. |
| 20 | +```py |
| 21 | +fox.submit_task(project_name="XXX", input_scene_path=r"v:\project\shot\lgt.ma", frames="1-10[1]") ``` |
| 22 | + |
| 23 | +- After render complete, you can download the entire task output files from cloud server, and single frame output files downloading is not supported yet currently. The download method would skip exists same files which already downloaded by default |
| 24 | +```py |
| 25 | +fox.download(task_id=11111, local_path=r"v:\project\output") |
| 26 | +``` |
| 27 | + |
| 28 | +## Query method |
| 29 | + - get user info |
| 30 | +```py |
| 31 | +fox.get_users() |
| 32 | +``` |
| 33 | + |
| 34 | +- get all projects |
| 35 | +```py |
| 36 | +fox.get_projects() |
| 37 | +``` |
| 38 | + |
| 39 | +- get specific project info |
| 40 | +```py |
| 41 | +fox.get_projects(project_name="XXX") |
| 42 | +``` |
| 43 | + |
| 44 | +- get all tasks |
| 45 | +```py |
| 46 | +fox.get_tasks() |
| 47 | +``` |
| 48 | + |
| 49 | +- get all tasks of specific project |
| 50 | +```py |
| 51 | +fox.get_tasks(project_name="XXX") |
| 52 | +``` |
| 53 | + |
| 54 | +- get specific task |
| 55 | +```py |
| 56 | +fox.get_tasks(task_id=11111) |
| 57 | +``` |
| 58 | + |
| 59 | +- get specific task with frames info |
| 60 | +```py |
| 61 | +fox.get_tasks(task_id=11111, has_frames=1) |
| 62 | +``` |
0 commit comments