Python sample demonstrating the viewer authorisation and translation process in a Python command line app
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 4 commits ahead of GetSomeRest:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE
README.md
credentials.txt
pyadva.py

README.md

workflow-python

Demonstrate the Autodesk View and Data API authorisation and translation process in a Python command line script.

Update

This sample is retired, please refer to other workflow samples.

Description

The workflow-python sample demonstrates the Autodesk View and Data API authorisation and translation process in a Python command line script, pyadva.py.

It closely follows the steps described in the documentation:

At the moment, you should probably take a look at the workflow-curl-view.and.data.api sample using Unix shell scripts and cURL. It is more fundamental than this Python sample and provides more working functionality than what is planned for this sample.

The Python one will be nice to have one of these days, especially because it might be possible to implement it so that it runs on both Unix and Windows. I hope you are already workhng on some flavour of Unix anyway, though.

Dependencies

Standard Python installation, the Python requests library, maybe switch to the Python pycurl library instead.

Setup/Usage Instructions

  • In order to make use of this sample, you need to register your consumer key, Request your consumer key/secret key from https://developer.autodesk.com. This provides the credentials to save in the file credentials.txt.

  • prepare a test model in the relative path, say samples/mytestmodel.rvt

  • replace the default model name at line 50

  • run the pythin script in any IDE.

License

workflow-python is licensed under the terms of the MIT License. Please see the LICENSE file for full details.

Written by

Jeremy Tammik

migrated by Xiaodong Liang

Autodesk Inc.