PyConMY 2025

PyConMY 2025

Brewing Better Reports - RedCoffee and SonarQube in Python
2025-11-02 , Hall 1

SonarQube ( https://www.sonarsource.com/products/sonarqube/ ) is one of the most popular tools for static code analysis, widely used to track code quality, vulnerabilities, bugs, maintainability, duplication, and test coverage. It integrates seamlessly with CI/CD pipelines and often becomes the single source of truth for code health in engineering teams.

While large enterprises may opt for SonarQube’s paid editions, many smaller startups, independent developers, and even internal teams rely on the free Community Edition. A key limitation there is the lack of PDF reporting. Earlier plugins existed but are now unmaintained, leaving no reliable way to generate portable reports.

This gap becomes more visible in practice:

Non-engineering stakeholders (managers, auditors, clients) struggle with the dashboard format.

Engineering teams often need portable PDFs for compliance, audits, and easy sharing.

Docker-based or local SonarQube setups make reports even harder to share beyond the developer’s machine.

In large organizations, SonarQube dashboards may be hidden behind network or access restrictions, blocking visibility for those who need it most.

This is where RedCoffee comes in.

RedCoffee is an open-source Python CLI that connects to SonarQube APIs, extracts key metrics, and brews them into actionable PDF reports. It bridges the gap between powerful static analysis and real-world usability, making SonarQube insights portable, shareable, and automation-friendly.


RedCoffee ( https://anubhav9.github.io/RedCoffee/ )is a Python-based CLI tool that helps developers generate and share PDF reports from SonarQube Community Edition.

The idea came out of a personal frustration in 2023. While working on an open-source project with friends, SonarQube CE was the perfect fit for code analysis. I ran it locally in Docker on my machine and used it to track code quality. But when I tried to share the results with my teammates, I hit a wall. CE doesn’t provide an option to export reports, which meant the only way was taking screenshots and sending them across. Not only was this clunky, but it also turned into long calls where I had to walk them through what the screenshots meant.

That experience led to RedCoffee. On the surface, it’s a simple tool - but it solves this exact problem cleanly.

How it’s built:

i) Core logic is plain Python, using the requests library to integrate with the SonarQube API.
ii) The CLI is built with Click for a smooth developer experience.
iii) Report generation (including charts/visuals) uses ReportLab.
iv) ASCII art banners are rendered with PyFiglet and colored with Colorma, giving it a fun personality.
v) It also integrates with Sentry, which lets me track usage and error logs — providing real feedback on how people are using the tool.

As of now, RedCoffee has been downloaded over 36,000 times, with around 130–150 weekly requests being made on the tool.

Here are some of the useful links for reference:

RedCoffee Github Repository : https://github.com/Anubhav9/RedCoffee
RedCoffee on PyPi : https://pypi.org/project/redcoffee/
[ Not maintained ] : RedCoffee for Github Actions - https://github.com/Anubhav9/RedCoffee-for-Github-Actions

Anubhav is a Senior Software Engineer at National Australia Bank, where he focuses on system test automation, backend tooling, and developer productivity across large-scale microservices.

Previously, he worked at Swiggy, one of India’s leading tech startups, where he contributed to improving automation frameworks and scaling quality practices in a high-growth environment. Before that, he began his career at STMicroelectronics, gaining hands-on experience with low-level engineering and large enterprise systems.

Outside of work, Anubhav is an active open-source contributor and the creator of RedCoffee, a Python CLI for generating SonarQube reports that has been downloaded over 36,000 times worldwide. He enjoys building tools that bridge gaps between developer workflows and real-world usability, with interests spanning Python, Docker, cloud-native ecosystems, and test automation.

When he’s not writing code, Anubhav enjoys traveling (especially to Japan), exploring local cultures, and tinkering with creative side projects that merge technology with everyday life.