Manually creating Azure DevOps reports can be time-consuming and repetitive. In this guide, you’ll learn how to automate Azure DevOps (ADO) reporting using Python and generate HTML reports with just a few commands.
Prerequisites
- Azure DevOps license (Trial license works)
- Azure DevOps Organization Name
- Project Name
- Personal Access Token (PAT)
- Python installed on your system
- VS Code or any Python editor
Install Required Libraries
Install the required Python packages:
pip install requests jinja2 python-dotenv
Download the Project
Clone or download the sample project from GitHub:
GitHub Repository: https://github.com/pintushaw/ADOReport
Use the provided .env.example file and update it with your Azure DevOps details:
- ADO_ORG
- ADO_PROJECT
- ADO_PAT
Generate the Report
Run the script:
python azure_devops_report.py
The script automatically generates an HTML report and saves it in the reports folder as:
report_YYYY-MM-DD.html
Benefits of Automating Azure DevOps Reports
- Eliminates manual report creation
- Saves time for project managers and teams
- Provides consistent reporting
- Easy to schedule for daily or weekly execution
- Customizable using Azure DevOps APIs and Python
By automating Azure DevOps reports, teams can focus more on delivery and less on repetitive reporting tasks.
For more detailed step by step guide follow my youtube video below.
