Fork me on GitHub


Write plugins in Python!

GeanyPy is a set of Python C extensions which wrap Geany's regular C plugin API. It allows writing custom Geany plugins in the Python language and interact with Geany's exposed plugin API.

Here's the HelloWorld example plugin from Geany's Plugin HowTo using GeanyPy:

import gtk
import geany

class HelloWorld(geany.Plugin):

    __plugin_name__ = "HelloWorld"
    __plugin_version__ = "1.0"
    __plugin_description__ = "Just another tool to say hello world"
    __plugin_author__ = "John Doe ("

    def __init__(self):
        self.menu_item = gtk.MenuItem("Hello World")
        self.menu_item.connect("activate", self.on_hello_item_clicked)

    def cleanup(self):

    def on_hello_item_clicked(widget, data):
        geany.dialogs.show_msgbox("Hello World")

For more information, see the README file.


GeanyPy's documentation although incomplete, can be found here:

Geany's plugin API documentation is also very useful:


To build GeanyPy you need the following dependencies:

See Geany's manual for information on compiling it from the Subversion or Git repositories.

If you're using a Debian-based distro, you can probably use the following command to install the dependencies (except for Geany 0.21 currently):

$ apt-get install python python-dev python-gtk2 python-gtk2-dev


You can download this project in either zip or tar formats.

You can also clone the project with Git by running:

$ git clone git://


First you need to know where Geany is installed:

$ GEANY_PREFIX=`pkg-config --variable=prefix geany`
The you can install as normal:
$ ./
$ ./configure --prefix=$GEANY_PREFIX
$ make
# make install
You should be able to force a specific version of Python to be used, by using the PYTHON_VERSION environment variable, but I've only tested with 2.6.6 so far. I imagine 2.7 series will also work fine.




Matthew Brush (codebrainz [at] codebrainz [dot] ca)
Colomban Wendling (ban [at] herbesfolles [dot] org)


Matthew Brush (codebrainz [at] codebrainz [dot] ca)