Automated student ID card generation using Python, Pillow, and QR encoding.
This package dynamically generates identity cards by combining:
- Profile photo processing (circular masking)
- QR code encoding
- Signature overlay
- Custom typography
- Template-based rendering
- CLI + batch CSV support
Designed as a modular, installable Python package.
- Circular profile photo masking
- Dynamic QR code generation
- Template-based ID layout system
- Batch generation from CSV
- Modular architecture
- Installable CLI command
- Pip-installable package
pip install \
--index-url https://test.pypi.org/simple/ \
--extra-index-url https://pypi.org/simple \
id-automationgit clone https://github.com/yourusername/id-automation.git
cd id-automation
pip install -e .Once installed, you can use the CLI command:
Make sure that you have the correct signature file in
assets/signature/sign.pngand all the people's photos inphotos/
id-automation --single \
--name "Aayush Pokharel" \
--program "Computer Science" \
--year "2019" \
--photo "Aayush.png"Generated files will be saved in:
output/
id-automation --csv students.csvname,program,year,photo
Aayush Pokharel,Computer Science,2019,Aayush.png
John Doe,IT,2020,john.png
Required CSV columns:
nameprogramyearphoto
id-automation/
│
├── id_automation/
│ ├── generator.py
│ ├── qr.py
│ ├── image_utils.py
│ └── cli.py
│
├── assets/
│ ├── templates/
│ ├── fonts/
│ └── signature/
│
├── photos/
├── output/
├── pyproject.toml
└── README.md
- Python 3.9+
- Pillow
- qrcode
- argparse
- setuptools (PEP 621 packaging)
- Loads ID base template
- Applies circular mask to profile image
- Generates QR code encoding user data
- Overlays name, program, and year using custom fonts
- Composites all layers into final ID image
- Saves result to output directory
Install in editable mode:
pip install -e .Run locally:
id-automation --helpAayush Pokharel
Email: [email protected]
GitHub: github.com/AayushPokharel
LinkedIn: linkedin.com/in/AayushPokharel
Personal / KUCC Project
Version: 2.0.0