Geckoboard Developer Community

Usage of Python geckoboard module -> client


For reasons unknown I cannot do like stated in the Python API doc with Python 3:

import geckoboard
client = geckoboard.client(API_KEY)

This gives me an error:

AttributeError: module ‘geckoboard’ has no attribute ‘client’

Instead this works for me:

from geckoboard.client import Client
client = Client(API_KEY)

So is either the documentation / code example not accurate or I’m doing something wrong… but what?


Hi @gitlech!

I suspect that the issue here is where the python file that is being run is stored. In my case, my code for Geckoboard lives in the same folder as the Geckoboard python client and I don’t have an issue with the import.

Is the file you’re running stored in a different place to the Geckoboard python client?



Hi @GeckoLisa!

Thanks for your reply. When running a pip install <module_name>, I’d consider it standard behaviour that the package would be installed to /<path_to_python>/…/site-packages/ which is the case when running

pip install

However, I’d find it unusual to store my working scripts (Python application) in the …/site-packages/ directory. I don’t know how the majority of Python developers would handle it, but I guess they have external package libraries and application code not in the same directory.


Absolutely! I’ll make sure that we add a note in our walkthrough for Python that the instructions are for code stored in the same directory as the client and that the standard import method for packages should be used if is being stored elsewhere. :slight_smile: