This is a simple python wrapper to work with Onshape REST API via the onshape-client.
Make sure to install onshape-client
pip install onshape-client
There is a simple unittest provided in this repo. To run the unittest you will need the onshape api access key and api secret key. You can get these keys from onshape developer portal once you have an onshape account. This is free to get.
Currently the following features are supported:
- get onshape document version id:
version_id = api.get_version(url)
- create a new version from the main document:
new_version_id = api.create_version(url)
- create a new branch from an existing version:
new_branch_url = api.get_branch_url(url)
- get a dictionary of features for a design:
features = api.get_features(url)
- delete a feature from a design:
api.delete_feature(url, features, featture_to_delete)
- copy an existing design:
api.copy_workspace(url)
- export to stl:
api.export_stl(url, filename)
orapi.export_step(url, filename)