c2bde3b1924a81226caca6061eecbcb953a6818f
Backblaze Invoice Downloader
Download Backblaze invoices as PDF using browser automation.
Backblaze only provides invoices via a web page that must be printed — this tool automates that process using Playwright, filling in configurable fields (VAT ID, document type, company, notes) and exporting each invoice to PDF.
Setup
pip install -r requirements.txt
playwright install chromium
Or with Nix:
nix develop
Configuration
Create a .env file (see .env.example):
BACKBLAZE_EMAIL=you@example.com
BACKBLAZE_PASSWORD=your_password
INVOICE_VAT_ID=DE123456789
INVOICE_DOCUMENT_TYPE=Invoice
INVOICE_COMPANY=My Company GmbH
INVOICE_NOTES=Internal ref: 12345
OUTPUT_DIR=./invoices
BROWSER_HEADLESS=true
Usage
python main.py
Options
-o, --output DIR Output directory (default: ./invoices)
--headless Run browser headless
--no-headless Show browser window (useful for debugging)
--vat-id ID VAT ID to fill on invoices
--document-type TYPE Document type to select
--company NAME Company name to fill
--notes TEXT Notes to fill on invoices
-v, --verbose Verbose logging
CLI arguments override .env values.
How it works
- Logs in to
secure.backblaze.com - Navigates to the billing page
- Iterates over all billing groups and years
- For each invoice, opens the invoice page, fills the configured fields, and exports to PDF
- Skips already-downloaded invoices
Description
Languages
Python
95.2%
Nix
4.8%