API · Document generation
ID → PDF
Type an ID. Get a PDF, with a QR code to prove it.
- Type
- API · Document generation
- Role
- [Add role]
- Year
- 2026
- Status
- Experiment
(01)What it is
The small, useful kind of tool: give it an employee ID, it finds the record and hands back a PDF — rendered from an HTML template, with a QR code carrying the verification data.
- Built at
- On my own time
- First commit
- May 2026
- File
- 14 of 18 project pages
(02)How it works
- 01→IDGET /api/employees/{id}/pdf
- 02→LookupSQLAlchemy over SQLite
- 03→RenderJinja2 HTML template
- 04→StampQR code, base64-embedded
- 05■PDFxhtml2pdf → download
(03)What's inside
- 01
A clean pipeline
Lookup, template, QR, PDF — each a small function, returned as a download with the right headers.
- 02
Seeded for demos
A seed script fills the database with mock employees so it works the moment it starts.
(04)The honest bit
- Mock data only, and not deployed — built to learn the pipeline end to end.
No fake users, no invented numbers. If it's a demo, it says so.
(05)Built with
- API
- Python/FastAPI
- Data
- SQLAlchemy/SQLite
- Documents
- Jinja2/xhtml2pdf/qrcode
(06)Links
- Live[No live demo yet]
- CodeView the code ↗