This repository contains a simple code snippet to generate a QR Code using Python and the qr-code package. The process involves setting up a virtual environment and installing necessary packages using pip. While the instructions are provided for a Windows environment with a .venv virtual environment, the process can be adapted for conda environments and other operating systems.
- Ensure Python is installed on your computer.
- Create a virtual environment using the following command:
python -m venv .venv
You can replace ".venv" with a different environment name if desired. More information in this website.
-
Activate the virtual environment by navigating to ".venv\Scripts\activate".
-
Once the virtual environment is activated, install the qrcode and pillow packages:
pip install qrcode
pip install pillow
- General QR Code Generation: You can customize the colors and add text (such as a title) to the QR Code. Use the General QR Code Notebook to generate a QR code for general propouses.
- Virtual Business Card (Vcard): This feature enables you to share your contact information using a QR Code. Use the Bussiness Card QR Code Notebook to generate a QR code with a Vcard.
Feel free to explore and modify the code to suit your needs!