Have sketchup software api for web integration?

i need a api for web integration in python

SketchUp does not have a Python API or Python bindings for its API.
See also this similar topic: Python bindings for SketchUp APIs?

  • You could learn Ruby, which is a very intuitive language. You can try it here or in the embedded Try Ruby tutorial in Ruby Console+. However, Python and Ruby have somewhat different paradigms: Python is strict about indentation, methods only appear under a single name (that you need to know or lookup) and it tends more towards procedural and global functions (len([0, 1, 2])) whereas Ruby has many synonyms/aliases for many methods (that you can easily guess) and tends more towards stricter object orientation ([0, 1, 2].length, length is a method of Array).

  • Regarding Python, there exist two inofficial projects that I didn’t test and that may or may not be up-to-date:

    • pyslapi, bindings using the C/C++ SDK, not the Ruby API
    • py-skp, bindings seem also to be based on the SDK
      They probably do not reflect all methods available in the API and require action by the maintainers to include new API/SDK features.
      They also do not increase platform support to more platforms than SketchUp itself supports.

What is the project that you have in mind? Have you ever any experience using python or using web technologies?
As you know, Python is not supported by web browsers, so it will be of little help for front-end development.
On the other side, SketchUp and its API do not run on servers, so they are of little help for back-end development.

2 Likes

i want to drawing in my website through sketchup for this reason i need api .i have a experience with web technologies like python ,laravel .and python obviously supported web browsers and also api design for server basis

So in short, you were asking for

  1. an embeddable version of the SketchUp for Web (editor)
  2. an API to interact programmatically with SketchUp for Web

You can embed the SketchUp Viewer, but it has no editing capabilities (although it is based on the same SketchUp application). You cannot embed the SketchUp for Web (editor).

If SketchUp for Web was embeddable and had an API, it would not be a Python API, rather JavaScript (or WASM). Again, web browsers are not able to run Python code (press CtrlShiftI to find that out). While there exist frameworks for front-end programming on server-side (with server-side languages like Python), they deliver HTML and JavaScript to the browser.

i need a api python is not fact.is there any solution ?

Any, yes. But not SketchUp.

You could build a 3D modeller on your own:

or try this:

2 Likes