This tool scans all repositories within a Bitbucket workspace and reports the number of unique contributors for each repo over the past 90 days.
- Fast and concurrent scanning of all repositories
- Adaptive rate-limit handling (avoids 429 lockouts)
- Secure password input with masking (
*) support across platforms - Exports results to
bitbucket_contributors.csv - Automatically ignores bots and duplicate names
- ✅ Windows
- ✅ macOS
- ✅ Linux
The script detects the platform automatically and uses:
msvcrtfor password masking on Windowstty/termiosfor password masking on Unix-based systems (macOS/Linux)
Save bitbucket_contributors.py to your local machine.
You need Python 3.7+ and the following packages:
pip install requestsrequests is the only required third-party module.
Go to: Bitbucket App Passwords
Click Create App Password and give it a label (e.g., "Contributor Reporter").
Check these permissions:
- ✅ Account: Read
- ✅ Workspace membership: Read
- ✅ Repositories: Read
Copy and securely save the generated password.
Run the script in a terminal:
python bitbucket_contributors.pyYou will be prompted for:
- Your Bitbucket username (e.g.
cxseanc) - Your app password (input is masked)
- Your Bitbucket workspace ID (e.g.
cxseancjiratest)
The script creates bitbucket_contributors.csv which includes:
- Each repo's unique contributor count
- A full mapping of repository to contributor names/emails
- A total contributor count summary at the bottom
- No credentials are stored.
- Password input is masked using platform-specific logic.
- Input sanitization protects against injection or CSV exploits.
=== Bitbucket Contributor Reporter (Optimized) ===
Enter Bitbucket username: cxseanc
Enter Bitbucket app password: *************
Enter Bitbucket workspace ID: cxseancjiratest
🔍 Fetching repositories...
✅ Processed: calc8066
...
✅ Report saved: bitbucket_contributors.csv
ModuleNotFoundError: No module named 'requests'→ Runpip install requests- 429 rate limits → Script will handle it automatically; just wait.
- Windows password masking errors → Handled via built-in compatibility logic.
| Scenario | Description | Estimated Time |
|---|---|---|
| ✅ Normal Load | Active repos w/ average commits, light 429s, steady flow | 10–15 minutes |
| Many commits in active repos, heavier 429 rate limiting | 15–25 minutes | |
| 🐢 Network Delays | VPN/latency, slow API responses, more retries | 25–35 minutes |
MIT (Free to use and modify)
If you encounter any issues, feel free to reach out to Sean or file a request in the project repo.
Happy scanning!