| assets | Loading last commit info... | |
| bundle | ||
| .gitignore | ||
| LICENSE | ||
| README.md | ||
| example_conf.json | ||
| get_members.py | ||
| main.py | ||
| upload_data.py |
What is this?
This is a small script that helps monitoring the activity of a guild's member by using the Wynncraft API and exporting the results to Google Sheet (for easy sharing)
Example:

How can I use it?
Create a Google Service Account and related API keys
For this script to be able to edit a Google Sheets, you will need to create a Google Service Account and an API key.
Note that Google is likely to offer you some plan with a free trial, YOU DO NOT NEED IT, just ignore it.
This blog post does a great job explaining how to get an API key, all the way from project creation. It also shows how to write your own script to use said API key, you do not need to read that part, that's what my script is for.
If you prefer using Google's official documentation (good luck, this is way overcomplicated for our needs), here you go:
- Create a Google Cloud project
- Create a Service Account
- Create an API key (I couldn't find a doc page for this):
- From your project dashboard, go to
Credentials - Select the service account you just created
- Select the
Keystab Add key->Create new key- Use the
JSONformat andCREATE - You now have downloaded a
.jsonfile containing your API key! keep it for now.
- From your project dashboard, go to
Share a Google Sheets Spreadsheet with your service account
Once again, the previously mentionned blog post does a great job explaining it.
Here is my attempt anyway:
- Create a new Google Sheets Spreadsheet (you may create a copy of this template)
- Share it with the previously created service account
- Open the
Sharemenu - Copy the email address of the service account in the
Add people,...field - Done
- Open the
- Save the spreadsheet ID, it will be useful later
- It's this part of the URL:

- It's this part of the URL:
Use the actual script
Option 1: I trust random strangers on the internet
I provide a bundled file for this script, that is a file you can execute just like an .exe file, without needing to install anything.
Before you execute this file, make sure you trust me (a random stranger on the internet) to not include anything malicious within it.
You give that trust whenever you use software you did not compile yourself, nothing special, but I believe that we should all be more aware of it.
If that's fine with you, then here you go:
- Download the content of the
bundlefolder - Move the API key
.jsonfile you got earlier to the same folder where you downloaded the script - Create a copy of the
example_conf.jsonfile and name itconf.json - In
conf.json, update- the name of the guild you want to follow in the
guild_namefield - the spreadsheet ID of the spreadsheet you shared with your service account (the one you saved earlier) in the
spreadsheet_id - the name of your API key file in the
credentials_filefield The rest is optional and doesn't need to be changed.
- the name of the guild you want to follow in the
- Execute the script (the
wynncraft-guild-listfile) by double clicking it, or executing it from command line.
If you are using Windows or MacOS, a terminal window should automatically open and display the progress/errors of the script.
If you are using Linux, you will only see the progress/errors if you execute the script from a command line.
Please be aware that the Wynncraft API as very low request rate limits, so it may take a few minutes if your guild has 40+ members.
Option 2: I want to edit the code / I don't trust you
Here, you will be using the python interpreter directly on the code, meaning you get to see exactly what it is you are running on your computer. You can also modify the code to your liking.
In this section I will assume you have some very basic knowledge of python/programming and/or are willing to look things up on your own.
1. Requirements
- A somewhat recent version of Python3 (tested with python 3.14)
2. Installing dependencies
Install (using pip or any other method) the google-api-python-client dependency. I would recommend using a virtual environment for this.
3. Download the script
You need the following 3 files:
main.pyget_members.pyupload_data.py
Why is it split in 3 files and not just one?
Because I wanted to be able to query the Wynncraft API without updating the Google Sheet, and the other way around. This was the most convenient way.
4. Read and edit the code however you like
5. Edit the config file
Start by creating a copy of example_conf.json and name it conf.json.
Here is what each field means:
guild_name: the name of the guild you want to tracksave_intermediate_file: whether you want to keep the data extracted from the Wynncraft API in a file after uploading it to Google Sheet (boolean)intermediate_file_name: the name of the file where the data from the API will be storedspreadsheet_id: the id of the spreadsheet you want to editsheet_name: the name of the specific sheet you want to edit within the spreadsheetcredentials_file: the name of the file where your Google API key is stored
Edit it appropriately.
6. Enjoy!
You can now run the script!
python3 get_members.py will fetch data from the API and store it in intermediate_file_name but won't upload it to the spreadsheet
python3 upload_data.py will look for prefetched data in intermediate_file_name and upload it to the spreadsheet
python3 main.py will fetch AND upload the data
Customize the spreadsheet
You should name the columns, create filters to order players by xp contributed, ...
Here is a template (filled with random values) that you can use as a starting point.
References
- Google Cloud documentation
- Python documentation
- Google Sheet API guide by Victor on Software
- Pip documention
License
MIT