Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Python Notebooks API Playground

matthew_mueller537matthew_mueller537 Member Posts: 25 EDU
Hello!

The PTC Education team has started to build out a library of snippets to help anyone get started with Onshape's RESP API using the python-client. This Github repo has some documentation on getting started as well as some example apps made in Google Colab. Here is a link to the main library of snippets.

We've found that Python Notebooks are a great way of writing a simple service or application for Onshape that doesn't need to be scaled (only works with API keys, not OAuth workflow), and sharing snippets through Google Colab are a very easy way to get started. This allows you to quickly add the power of Python and all of its libraries (machine learning, analysis, visualization, etc.) to you design/development workflow with Onshape, or write a simple service to connect Onshape with any other platform that has a REST API.

We are still in the process of building out the snippets library and examples, but would love any feedback or ideas (or code contributions) from the community to make this as useful as possible!

Thanks,
Matt

Comments

  • tim_hess427tim_hess427 Member Posts: 648 ✭✭✭✭
    The timing for this is great! I was just thinking about digging into the API's last week and python is the language I'm most comfortable with. 

    I've never used Google Colab before, but looks interesting. 
  • George_AndersonGeorge_Anderson Member Posts: 71 ✭✭
    Very nice -- this needs more visibility. Suggest a link in the Onshape Developer Portal. This would've saved me so much time already.
  • S1monS1mon Member Posts: 2,980 PRO
    I'd like to see examples of real world things where companies are using this to solve problems. A quick video and a link to some code would be great. 

    For me who's done a certain amount of coding in my life but isn't super familiar with Python, I can skim the code and can see how it might be possible to do something useful. However I can't tell how complete the Python access to Onshape is, and what sorts of problems might be best to solve this way vs something else. What are the limitations? Why isn't this more popular?
Sign In or Register to comment.