gscwrapper
is aimed at providing SEO profesionnals wotking with Python a strong basis to work with Google Search Console's data.
It provides an easy way to query and work with data from the following endpoints for the API:
You can also use it to query your GSC bulk data export without having to worry about writing SQL code.
There are countless GSC libraries available. My favorite (and the one I've been using for years) is available here. That being said, these libraries:
- Are often limited to downloading data and don't offer methods to run common SEO analysis. I would often end up copying my code between notebooks and I needed a library to centralize the common operations I often do.
- Are sometimes owned by non-SEO and therefore aren't always up-to-date, especially when there is an API update. Python is used by many SEO professionals and yet we often rely on non-SEO to maintain the libraries we use as an industry.
I've decided to create my own based on my most common needs as a SEO profesionnal. It has also been a fun project to work on :)
DISCLAIMER: this library is not aimed at taking decisions for you, it just speeds up some repetitive data manipulation tasks we often do. I strongly advise you to read & understand the code behind a method if you aim at taking decisions only based on the output of a method. In most cases, the only library used under the hood is Pandas.
This library works perfectly with Google Colab and similar products. You just have to adapt slightly the code when you use the generate_auth()
function explained here.
(
gscwrapper
.generate_auth(
client_config = "/client_secret.json",
serialize="/credentials.json",
#extra param to make it work with Colab
google_colab=True
)
)
Unfortunately, I can't fix an issue that has to do with how some companies handle their dependencies (enforcing a rule to prevent a library from updating for instance).
You're more than welcome to send suggestions or raise issues through GitHub. Nevertheless:
- I cannot solve an issue I'm not aware of: please provide context.
- I try to stick to generic use cases: we all have ad-hoc analysis we'd love to speed-up. But I can't include everything in this library.
- The code is extensively commented to make it readable for everyone, even if you don't master Python. If you have a question on how a method works under the hood, please have a look at the code first.
- I'm not a developer and this is, by far, the most complex project I had to work on by myself. I try to stick to concepts I understand and I won't update my code just because I'm not using a best practice here and there.
- I do it for free and hence I have to prioritize my (paid) work and my personnal life over this library. I use this library almost every day though, so it's in my best interest to fix bugs ;)