# Add a string property to a python reader

**URL:** https://discourse.paraview.org/t/add-a-string-property-to-a-python-reader/11471
**Category:** ParaView Support
**Created:** [February 22, 2023, 7:23pm UTC](https://discourse.paraview.org/t/add-a-string-property-to-a-python-reader/11471 "2023-02-22T19:23:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Juan\_Jose\_Casafranca](https://discourse.paraview.org/user_avatar/discourse.paraview.org/juan_jose_casafranca/32/3499_2.png) [@Juan\_Jose\_Casafranca](https://discourse.paraview.org/u/Juan_Jose_Casafranca)
#### Post date: [February 22, 2023, 7:23pm UTC](https://discourse.paraview.org/t/add-a-string-property-to-a-python-reader/11471/1 "2023-02-22T19:23:25Z")

</div>

I have a custom reader written in Python which loads an HDF5 file and generates a vtkMultiBlockDataSet with some vtkUnstructedGrid on the leafs of the hierarchy. However, this can get too slow, as the file may contain a lot of information.

I would like to know if its possible to add a some kind of property to the reader and expose it on paraview interface such that I can discard elements.

I was thinking having a string property for example, so I can start iterating the HDF5 file on the HDF5 group under that string instead of on the root node.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [February 23, 2023, 8:50am UTC](https://discourse.paraview.org/t/add-a-string-property-to-a-python-reader/11471/2 "2023-02-23T08:50:13Z")

</div>

Hi @Juan_Jose_Casafranca

Yes, this is exactly the point of a python plugin, find some examples here: [https://gitlab.kitware.com/paraview/paraview/-/blob/master/Examples/Plugins/PythonAlgorithm/PythonAlgorithmExamples.py](https://gitlab.kitware.com/paraview/paraview/-/blob/master/Examples/Plugins/PythonAlgorithm/PythonAlgorithmExamples.py)

---

<div class="post-metadata">

### Author: ![Juan\_Jose\_Casafranca](https://discourse.paraview.org/user_avatar/discourse.paraview.org/juan_jose_casafranca/32/3499_2.png) [@Juan\_Jose\_Casafranca](https://discourse.paraview.org/u/Juan_Jose_Casafranca)
#### Post date: [February 23, 2023, 9:55am UTC](https://discourse.paraview.org/t/add-a-string-property-to-a-python-reader/11471/3 "2023-02-23T09:55:16Z")

</div>

I was having a look at that examples, but I am not sure how it really works. When are those decorators executed? How I know if they are Set or Get? In my reader I have for example a GetTimeStepValues, but its there basically because I copy pasted from the example, not because I really understand how its working.

Is there any place where it explains how those decorators really work? When they are executed?
