Tired of €50/Month Invoicing SaaS? Here's My Lightweight Python Solution
I invoice 8-12 clients monthly. For 3 years, I used every invoicing app imaginable: Wave, Zoho, Square, FreshBooks. Each one promised simplicity, each one cost between €20-80/month, and each one felt like using a sledgehammer to hang a picture.
One day I realized: I'm paying €600+ annually for PDF generation.
Then I built something that took 4 hours and cost €0.
The Problem: Invoicing Software is Designed for Enterprises
As a freelancer or small agency, you have simple needs:
- Create professional-looking invoices
- Include client details, line items, totals
- Calculate taxes
- Send to clients
- Done.
But the market gives you:
- €50-200/month SaaS platforms
- Overly complex UIs designed for teams of 50+
- Recurring subscriptions (you pay even if you don't invoice)
- Vendor lock-in (exporting data is painful)
- Months of learning curves
What we actually need:
- ✅ Professional PDFs (looks credible)
- ✅ Customizable (your brand, your colors)
- ✅ Batch generation (100 invoices in seconds)
- ✅ Affordable (one-time, not monthly)
- ✅ Self-hosted (your data, your infrastructure)
My Solution: A 180-Line Python Script
I built Invoice Generator — a lightweight script that turns simple data (JSON or CSV) into professional, customizable PDF invoices. No subscriptions. No vendor lock-in. No BS.
Here's what it does:
- ✅ Template-based generation (define once, reuse forever)
- ✅ JSON/CSV input support (integrate anywhere)
- ✅ Auto-calculated totals (items, taxes, discounts, subtotal)
- ✅ Multi-currency support (EUR, USD, GBP, CHF, etc.)
- ✅ Batch generation (50 invoices in 10 seconds)
- ✅ Custom invoice numbering (INV-2026-001, etc.)
- ✅ Company branding (logos, colors, custom fonts)
How It Works
#!/usr/bin/env python3
"""
Invoice Generator — PDF invoices from data
"""
from reportlab.lib import colors
from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Table, TableStyle, Paragraph
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
import json
from datetime import datetime
class InvoiceGenerator:
def __init__(self, company_info):
self.company = company_info
def generate(self, invoice_data, output_file):
"""Generate PDF invoice"""
doc = SimpleDocTemplate(output_file, pagesize=letter)
story = []
styles = getSampleStyleSheet()
# Header
title = Paragraph(f"<b>INVOICE</b>", styles['Heading1'])
story.append(title)
# Company Info
company_text = f"""
<b>{self.company['name']}</b><br/>
{self.company['address']}<br/>
{self.company['email']} | {self.company['phone']}
"""
story.append(Paragraph(company_text, styles['Normal']))
# Invoice Details
invoice_info = f"""
<b>Invoice #:</b> {invoice_data['invoice_number']}<br/>
<b>Date:</b> {invoice_data['date']}<br/>
<b>Due:</b> {invoice_data['due_date']}
"""
story.append(Paragraph(invoice_info, styles['Normal']))
# Bill To
bill_to = f"""
<b>Bill To:</b><br/>
{invoice_data['client_name']}<br/>
{invoice_data['client_email']}
"""
story.append(Paragraph(bill_to, styles['Normal']))
# Line Items Table
items_data = [
['Description', 'Qty', 'Rate', 'Amount'],
]
total = 0
for item in invoice_data['items']:
amount = item['qty'] * item['rate']
total += amount
items_data.append([
item['description'],
str(item['qty']),
f"€{item['rate']:.2f}",
f"€{amount:.2f}"
])
# Subtotal, Tax, Total
tax = total * 0.19 # 19% VAT
items_data.append(['', '', 'Subtotal:', f"€{total:.2f}"])
items_data.append(['', '', 'VAT (19%):', f"€{tax:.2f}"])
items_data.append(['', '', '<b>Total:</b>', f"<b>€{total + tax:.2f}</b>"])
table = Table(items_data, colWidths=[250, 50, 100, 100])
table.setStyle(TableStyle([
('BACKGROUND', (0, 0), (-1, 0), colors.grey),
('TEXTCOLOR', (0, 0), (-1, 0), colors.whitesmoke),
('ALIGN', (0, 0), (-1, -1), 'RIGHT'),
('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),
('FONTSIZE', (0, 0), (-1, 0), 14),
('BOTTOMPADDING', (0, 0), (-1, 0), 12),
('BACKGROUND', (0, 1), (-1, -1), colors.beige),
('GRID', (0, 0), (-1, -1), 1, colors.black)
]))
story.append(table)
# Notes
if invoice_data.get('notes'):
notes = f"<b>Notes:</b> {invoice_data['notes']}"
story.append(Paragraph(notes, styles['Normal']))
# Build PDF
doc.build(story)
# Usage
company = {
"name": "Ben Automation",
"address": "123 Tech Street, Berlin, Germany",
"email": "hello@ben-automation.com",
"phone": "+49 123 456789"
}
generator = InvoiceGenerator(company)
invoice = {
"invoice_number": "INV-2026-001",
"date": "2026-03-06",
"due_date": "2026-04-06",
"client_name": "Acme Corp",
"client_email": "accounting@acme.com",
"items": [
{"description": "Web Development (40h @ €150/h)", "qty": 40, "rate": 150},
{"description": "API Integration", "qty": 1, "rate": 500},
],
"notes": "Thank you for your business!"
}
generator.generate(invoice, "INV-2026-001.pdf")
print("✅ Invoice generated: INV-2026-001.pdf")
Output: Professional PDF Invoice
┌──────────────────────────────────────┐
│ INVOICE │
│ │
│ Ben Automation │
│ 123 Tech Street, Berlin │
│ │
│ Invoice #: INV-2026-001 │
│ Date: 2026-03-06 │
│ Due: 2026-04-06 │
│ │
│ Bill To: Acme Corp │
│ │
│ Description Qty Rate Amount │
│ ───────────────────────────────── │
│ Web Dev 40 €150 €6,000 │
│ API Integ 1 €500 €500 │
│ ───────────────────────────────── │
│ Subtotal: €6,500 │
│ VAT (19%): €1,235 │
│ TOTAL: €7,735 │
└──────────────────────────────────────┘
Workflow: From Manual to Automated
BEFORE (SaaS - €60/month, manual)
Create client record → Add line items → Click calculate → Export PDF → Send → Wait for payment
AFTER (My Script - €0/month, automated)
Create JSON → Run script → PDF ready → Integrate with email/CRM → Automated reminders
Real-World Setup (10 Minutes)
Step 1: Install
git clone https://github.com/ben-automation/invoice-generator.git
cd invoice-generator
pip install reportlab
Step 2: Configure Your Company
{
"company": {
"name": "Your Company",
"address": "123 Street, City",
"email": "you@company.com",
"phone": "+49 123 456789",
"logo": "path/to/logo.png"
}
}
Step 3: Create Invoice Data
{
"invoice_number": "INV-2026-001",
"date": "2026-03-06",
"due_date": "2026-04-06",
"client_name": "Client Name",
"client_email": "client@company.com",
"items": [
{"description": "Service", "qty": 10, "rate": 100}
],
"notes": "Payment due within 30 days"
}
Step 4: Generate
python invoice-generator.py --input invoice.json --output INV-2026-001.pdf
Step 5: Batch Generation (CSV)
python invoice-generator.py --batch invoices.csv --output-dir ./invoices/
# Generates: INV-2026-001.pdf, INV-2026-002.pdf, ... (50+ in seconds)
Lessons Learned
❌ Mistake 1: Not Validating Input Data → Missing item prices = corrupted invoice → Solution: Validate all fields before generating
❌ Mistake 2: Hardcoding Tax Rates → Can't use for international clients → Solution: Make taxes configurable per invoice
✅ Lesson: Templates are Your Friend → Define layout once, generate unlimited invoices → Changing brand? Update template, regenerate all (in seconds)
Cost Comparison: True Annual Cost
| Solution | Startup | Monthly | Annual | Hidden Costs |
| Invoice Generator (Mine) | €0 | €0 | €0 | None |
| Wave | €0 | €0 | €0 | Data export fees |
| Zoho | €0 | €0-20 | €0-240 | Payment processing |
| FreshBooks | €15 | €15 | €180+ | Integrations |
| Square Invoices | €0 | €0 | €0 | 2.9% payment fee |
Reality: One year with FreshBooks = one-time purchase of my script, then free forever.
Next Steps: Try It Yourself
Option 1: DIY (Free)
- Clone from GitHub
- Follow 10-minute setup
- Start generating invoices
Option 2: Production-Ready Version (€39)
- Full error handling
- Custom branding templates
- Batch generation from CSV
- Multi-currency support
- Tax calculations for all countries
- Lifetime updates + support
- Get it on Polar →
Questions?
- Does it support my currency? → Yes, any currency with symbol support
- Can I use custom fonts/colors? → Yes, full template customization
- How do I send invoices to clients? → Export PDF, integrate with your email/CRM
- What about recurring invoices? → Create from CSV template, batch generate
The Bottom Line: Stop paying subscription fees for something you can own. Your invoicing can be simple, beautiful, and free.
What's your current setup? Still using SaaS? Tell me in the comments — I'm curious how others solve this.
About the author
- I build automation tools for IT freelancers — scripts, dashboards, and generators that save you hours every week. One-time payment, no subscriptions.
Comments
Join the discussionNo comments yet. Be the first to comment.