# vtkPythonAlgorithm - design objective ?

**URL:** https://discourse.vtk.org/t/vtkpythonalgorithm-design-objective/15371
**Category:** Development
**Tags:** c
**Created:** [March 12, 2025, 6:54pm UTC](https://discourse.vtk.org/t/vtkpythonalgorithm-design-objective/15371 "2025-03-12T18:54:52Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Nicholas\_Yue](https://discourse.vtk.org/user_avatar/discourse.vtk.org/nicholas_yue/32/3751_2.png) [@Nicholas\_Yue](https://discourse.vtk.org/u/Nicholas_Yue)
#### Post date: [March 12, 2025, 6:54pm UTC](https://discourse.vtk.org/t/vtkpythonalgorithm-design-objective/15371/1 "2025-03-12T18:54:52Z")

</div>

Hi,

I am looking at vtkPythonAlgorithm C++ class.

What was the design goal of vtkPythonAlgorithm ? What are the current classes that subclass from it and what are their use cases ?

Kind regards

---

<div class="post-metadata">

### Author: ![Christos\_Tsolakis](https://discourse.vtk.org/user_avatar/discourse.vtk.org/christos_tsolakis/32/2076_2.png) [@Christos\_Tsolakis](https://discourse.vtk.org/u/Christos_Tsolakis)
#### Post date: [March 12, 2025, 10:01pm UTC](https://discourse.vtk.org/t/vtkpythonalgorithm-design-objective/15371/2 "2025-03-12T22:01:08Z")

</div>

It allows to create algorithms in Python which behave like regular vtk algorithms. `vtkPythonAlgorithm` is just the glue between the C++ and Python layer. I don’t think they are subclasses in C++ there are however in Python.  
Here are some examples in a test: [https://gitlab.kitware.com/vtk/vtk/-/blob/v9.4.0/Filters/Python/Testing/Python/TestPythonAlgorithm.py](https://gitlab.kitware.com/vtk/vtk/-/blob/v9.4.0/Filters/Python/Testing/Python/TestPythonAlgorithm.py)

Check out also this [https://www.kitware.com/vtkpythonalgorithm-is-great/](https://www.kitware.com/vtkpythonalgorithm-is-great/)

More examples here [https://www.paraview.org/paraview-docs/nightly/python/paraview.util.vtkAlgorithm.html#examples](https://www.paraview.org/paraview-docs/nightly/python/paraview.util.vtkAlgorithm.html#examples)

If you are only interested in VTK and not ParaView you can ignore the decorators in this file.
