# Gramplet creation - In order to begin my own research gramplet

**URL:** <https://gramps.discourse.group/t/gramplet-creation-in-order-to-begin-my-own-research-gramplet/7919>\
**Category:** Development\
**Tags:** third-party-addon\
**Created:** [July 5, 2025, 1:20pm UTC](https://gramps.discourse.group/t/gramplet-creation-in-order-to-begin-my-own-research-gramplet/7919 "2025-07-05T13:20:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![ursus](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/ursus/32/5975_2.png) [@ursus](https://gramps.discourse.group/u/ursus)\
**Post date:** [July 5, 2025, 1:20pm UTC](https://gramps.discourse.group/t/gramplet-creation-in-order-to-begin-my-own-research-gramplet/7919/1 "2025-07-05T13:20:47Z")

</div>

In order to begin my own research gramplet I am learning and doing some testing. Very basic stuff, can’t even get that to work. So what am I soing wrong.  
file: tester.py

```python
import gramps.gen.plug as plug

class TestGramplet(plug.PlugIn):
    def run(self):
        print("Test Gramplet is running!")

def register():
    return TestGramplet()

```

Put this file in `C:\Program Files\GrampsAIO64-6.0.3\gramps\plugins\gramplet`  
Started Gramps, but can’t find it anywhere, what did I miss?

GrampsAIO64-6.0.3 win 11pro (me still very much a novice here!)

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [July 5, 2025, 1:38pm UTC](https://gramps.discourse.group/t/gramplet-creation-in-order-to-begin-my-own-research-gramplet/7919/2 "2025-07-05T13:38:13Z")

</div>

Here is a simple “Hello World” type example:

In the file _tester.py_:

```python
from gramps.gen.plug import Gramplet

class Tester(Gramplet):

    def main(self):
        self.set_text("Test Gramplet is running!")

```

In the file _tester.gpr.py_:

```python
register(
    GRAMPLET,
    id="Tester",
    name=_("Tester"),
    description=_("A test gramplet"),
    version="0.0.1",
    gramps_target_version="6.0",
    status=STABLE,
    fname="tester.py",
    height=200,
    gramplet="Tester",
    gramplet_title=_("Tester"),
)

```

Add the gramplet called “Tester” to your dashboard view.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [July 5, 2025, 1:54pm UTC](https://gramps.discourse.group/t/gramplet-creation-in-order-to-begin-my-own-research-gramplet/7919/3 "2025-07-05T13:54:04Z")

</div>

You probably will want to review the [Gramps Development](https://gramps-project.org/wiki/index.php/Gramplets_development) wiki article.

It dives deeper into the Hello World example and the Gramps Plugin Registration options.

More importantly, it explains how to control when your gramplet refreshes or responds to changes to the tree data and GUI record selections. (The callback and signals are important information.)

---

<div class="post-metadata">

**Author:** ![ursus](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/ursus/32/5975_2.png) [@ursus](https://gramps.discourse.group/u/ursus)\
**Post date:** [July 5, 2025, 2:03pm UTC](https://gramps.discourse.group/t/gramplet-creation-in-order-to-begin-my-own-research-gramplet/7919/4 "2025-07-05T14:03:06Z")

</div>

Thanks you both. The example worked. But trying to read some stuff I feel so far out of my depth. Need to think long and hard if I even want to invest in this to the point where plug-in would do all the work I require from it.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [July 5, 2025, 2:12pm UTC](https://gramps.discourse.group/t/gramplet-creation-in-order-to-begin-my-own-research-gramplet/7919/5 "2025-07-05T14:12:14Z")

</div>

> [@ursus](#):
>
> But trying to read some stuff I feel so far out of my depth. Need to think long and hard if I even want to invest in this to the point where plug-in would do all the work I require from it.

I understand completely.

My starting point was tweaking some existing plugins. (Tiny things like refining text or layout. And making the Registration data more helpful… with better descriptions or pointing the Help buttons to more useful URLs.)

When it came to functional plugins, deferring the interface seems like a good choice. Work on making the code do something in SuperTool (or one of the query language tools) before structuring a plugin around it.

It is very tedious restarting Gramps (to register the the changed plugin) and navigating the GUI back to where you can re-test. So make the basic function work first.

After you wrap it in interface, you’ll still do endless tweaks and restarts. But you are less likely to abandon your project if you can see some results.

---

<div class="post-metadata">

**Author:** ![kulath](https://avatars.discourse-cdn.com/v4/letter/k/e99b99/32.png) [@kulath](https://gramps.discourse.group/u/kulath)\
**Post date:** [July 24, 2025, 6:53pm UTC](https://gramps.discourse.group/t/gramplet-creation-in-order-to-begin-my-own-research-gramplet/7919/6 "2025-07-24T18:53:59Z")

</div>

> [@emyoulation](#):
>
> It is very tedious restarting Gramps (to register the the changed plugin) and navigating the GUI back to where you can re-test. So make the basic function work first.

I used to be able to click on “reload” in the plugin Manager to reload the plugin without having to completely restart Gramps. I don’t know whether this is still possible with the current release.

I also used a complicated piece of code to import sub-modules when the main plugin is reloaded (in ImportGedcom.py):

```python
# The following code is necessary to ensure that when Help->Plugin
# Manager->Reload is executed, not only is the top-level exportgedcom file
# reloaded, but also the dependent libgedcom. This ensures that testing can have
# a quick turnround, without having to restart Gramps.
module = __import__ ("gramps.plugins.lib.libgedcom",
                    fromlist=["gramps.plugins.lib"]) # why o why ?? as above!
import imp
imp.reload(module)

```

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [July 24, 2025, 8:57pm UTC](https://gramps.discourse.group/t/gramplet-creation-in-order-to-begin-my-own-research-gramplet/7919/7 "2025-07-24T20:57:15Z")

</div>

> [@kulath](#):
>
> I used to be able to click on “reload” in the plugin Manager to reload the plugin without having to completely restart Gramps. I don’t know whether this is still possible with the current release.

@kku also wrote a [Reload Plugins addon Tool](https://github.com/kkujansuu/gramps?tab=readme-ov-file#reload-plugins) to help compress the process when tweaking plugins.

> <https://github.com/kkujansuu/gramps/blob/master/addons%2Freload_plugins%2FREADME.md>

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [August 23, 2025, 8:58pm UTC](https://gramps.discourse.group/t/gramplet-creation-in-order-to-begin-my-own-research-gramplet/7919/8 "2025-08-23T20:58:06Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
