# Docs for python wrapper

**URL:** https://discourse.vtk.org/t/docs-for-python-wrapper/2497
**Category:** Support
**Created:** [January 25, 2020, 8:16pm UTC](https://discourse.vtk.org/t/docs-for-python-wrapper/2497 "2020-01-25T20:16:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![JDJD](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/j/bc8723/32.png) [@JDJD](https://discourse.vtk.org/u/JDJD)
#### Post date: [January 25, 2020, 8:16pm UTC](https://discourse.vtk.org/t/docs-for-python-wrapper/2497/1 "2020-01-25T20:16:03Z")

</div>

Does anyone know where I can find the docs for the VTK Python wrapper? I can only find docs for the C++ version and installation instructions for the python wrapper!

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [January 26, 2020, 4:13am UTC](https://discourse.vtk.org/t/docs-for-python-wrapper/2497/2 "2020-01-26T04:13:19Z")

</div>

The C++ API reference is functional (since class and method names are the same), there are also tons of Python examples, and you can always get Python-style documentation of any VTK class or method by using `help` command in the Python console - so the situation is not so bad now. But it would be indeed very nice to have proper Python-style API reference.

@dgobbi would it be possible to generate Python skeleton files (.py files that contains classes with their methods and documentation but with empty implementation)? It could be fed into Sphinx to generate Python documentation (and may help some of the Python IDEs with auto-complete and documentation). PyCharm can generate skeletons from binaries ([https://github.com/JetBrains/python-skeletons](https://github.com/JetBrains/python-skeletons)) but it seems to be deprecated. Do you have any other idea?

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [January 27, 2020, 2:39pm UTC](https://discourse.vtk.org/t/docs-for-python-wrapper/2497/3 "2020-01-27T14:39:51Z")

</div>

The C++ docs don’t cover everything, for instance they don’t even mention the [numpy interface](https://blog.kitware.com/improved-vtk-numpy-integration/).

I did some work in November on generating PyCharm compatible docstrings for .pyi stub files, and plan to finish the work sometime next month, but I don’t know if sphinx can use .pyi files (I don’t know if sphinx can handle @overload, and VTK has _lots_ of overloaded methods).

---

<div class="post-metadata">

### Author: ![lassoan](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lassoan/32/50_2.png) [@lassoan](https://discourse.vtk.org/u/lassoan)
#### Post date: [January 27, 2020, 7:12pm UTC](https://discourse.vtk.org/t/docs-for-python-wrapper/2497/4 "2020-01-27T19:12:30Z")

</div>

It seems that [sphinx documentation generator from code does not support `@overload`](https://github.com/sphinx-doc/sphinx/issues/3610). So, generating documentation from Python stub may not be ideal.

[Breathe](https://breathe.readthedocs.io/en/latest/) can generate Sphinx input from doxygen XML and it [seems to support `@overload`](https://github.com/svenevs/exhale/pull/45). An option may be to generate C++ API documentation using doxygen, then run breathe+sphinx to generate Python API documentation.
