This repository contains a modern Python application for generating QR codes with personal details. The application features a clean, contemporary user interface built with Tkinter, and uses the qrcode library for QR code generation with Pillow (PIL) for image processing. The UI follows modern design principles with a light color palette, improved spacing, and intuitive user experience.
- Modern, Clean UI: Contemporary design with light color scheme, improved typography (Segoe UI), and better visual hierarchy
- Smart Name Autofill: Automatically fills the name field from your Git configuration (user.name or derived from user.email)
- Directory Browser: Browse button to easily select save location using file explorer dialog
- Real-time QR Preview: Displays generated QR code instantly in the application window
- Input Validation: Comprehensive validation with trimmed inputs and clear error messages
- Auto-folder Creation: Automatically creates a
qr_codesfolder in the specified directory - Status Messages: Temporary status messages that auto-clear after successful operations
- Personal Details QR: Generates QR codes containing phone number, name, age, and education information
- Clear Functionality: One-click clear button to reset all fields and start fresh
- Python 3.x
- pip (Python package installer)
git clone https://github.com/ojhaprathmesh/QR_Generator_Repo.git
cd QR_Generator_Repopython -m venv .venv --upgrade-depsFor Windows (PowerShell):
.venv\Scripts\Activate.ps1For Windows (Command Prompt):
.venv\Scripts\activate.batFor Linux/Mac:
source .venv/bin/activatepip install -r requirements.txt- Ensure you have activated your virtual environment (if using one)
- Run the script
qr_generator.pyto launch the application:python qr_generator.py
- The application window will open with a modern, clean interface
- Name Field: May be auto-filled from your Git configuration. You can edit it if needed
- Enter the required personal details in the provided fields:
- Name (required) - Auto-filled from Git if available
- Phone Number (required)
- Age (required)
- Education (required)
- Save Location:
- Defaults to current working directory
- Click the "Browse" button to select a different folder using the file explorer
- Or manually type the path in the save location field
- Click the "Generate" button to create the QR code
- The generated QR code will be displayed instantly in the preview panel on the right
- A success message will appear briefly and then return to the default hint
- The QR code image will be saved in a
qr_codesfolder at the specified location with the filename format:Phone_No_{phone_number}.png - Use the "Clear" button to reset all fields and start over
QR_Generator_Repo/
├── qr_generator.py # Main application file
├── setup_qr_generator.py # Setup script for creating executable
├── requirements.txt # Python dependencies
├── README.md # Project documentation
└── LICENSE # MIT License
The project requires the following Python packages (listed in requirements.txt):
- qrcode (8.2) - QR code generation library
- Pillow (12.0.0) - Image processing and manipulation
- python-resize-image (1.1.20) - Image resizing functionality
- resize-image (0.4.0) - Additional image resizing utilities
- cx-Freeze (8.5.0) - For creating standalone Windows executables
- Additional dependencies: cabarchive, certifi, charset-normalizer, colorama, filelock, freeze-core, idna, lief, packaging, requests, setuptools, striprtf, urllib3
Note: Tkinter is included with Python by default on most installations. If it's not available, install it through your system's package manager.
To create a standalone executable for Windows, you have two options:
python build_exe.pyThis uses a wrapper script that filters out expected warnings for cleaner output.
python setup_qr_generator.py buildThis will create an executable in the build directory that can be run without Python installed. The executable will include all necessary dependencies and can be distributed independently.
About Build Warnings:
- You will see warnings about "Missing modules" during the build process - these are normal and expected
- The setup script is configured to exclude unnecessary optional modules (like OpenSSL, cryptography, HTTP/2 support, compression libraries, etc.) that aren't needed for QR code generation
- These exclusions help reduce the executable size significantly
- Warnings about Windows DLLs (api-ms-win-crt-*.dll) are also normal - these are provided by the Visual C++ Redistributable, which is pre-installed on most Windows systems
- The application will work perfectly despite these warnings, as they only refer to optional dependencies
Note: The setup script uses cx_Freeze and is configured for Windows. For other platforms, you may need to adjust the setup configuration.
- UI Framework: Tkinter with modern styling
- QR Code Format: Standard QR code format readable by any QR scanner
- Image Format: PNG format for generated QR codes
- Folder Structure: QR codes are saved in a
qr_codessubdirectory - Git Integration: Automatically retrieves user name from Git global configuration
- Window Size: Fixed at 900x500 pixels for consistent layout
- Color Scheme: Light, modern palette with proper contrast for accessibility
Contributions are welcome! Here are some areas where you can help:
-
Additional Features:
- Batch QR code generation to process multiple sets of personal details at once
- Integration with cloud storage services to automatically upload generated QR codes
- Support for different QR code formats and customization options (colors, logos, error correction levels)
- Export functionality (PDF, CSV of generated QR codes)
- QR code scanning/reading functionality
- History/log of generated QR codes
-
Code Improvements:
- Enhanced input validation (phone number format, age range, etc.)
- Better error handling with more informative messages
- Unit tests and test coverage
- Code documentation and type hints
- Performance optimizations
-
Platform Support:
- macOS and Linux executable builds
- Cross-platform compatibility improvements
- Installation scripts for different platforms
- All fields (Name, Phone Number, Age, Education) are required to generate a QR code
- The name field will be auto-filled from your Git configuration if available (checks
git config --global user.nameor derives fromuser.email) - Input values are automatically trimmed of whitespace
- The default save location is the current working directory, but you can change it using the Browse button or by typing a path
- QR codes are saved in a
qr_codesfolder (lowercase) within the specified directory - The application creates the
qr_codesfolder automatically if it doesn't exist - Generated QR codes can be scanned by any standard QR code reader app
- The QR code contains formatted text with all personal details
- Tkinter not found: Install Python with Tkinter support, or install
python3-tkon Linux - Permission errors: Ensure you have write permissions to the selected save directory
- Git name not auto-filling: This is optional; you can manually enter your name
- QR code not displaying: Check that all required fields are filled and the directory path is valid
This project is licensed under the MIT License - see the LICENSE file for details.
Developed by Prathmesh
Feel free to contribute, report issues, or suggest improvements. Thank you for using the QR Code Generator!