Metadata-Version: 2.1
Name: custom_qr
Version: 0.9.4
Summary: Generate and customize QR codes
Home-page: https://github.com/DaYe03/custom_qr.git
Author: Daniele Ye
Author-email: daniele.ye03@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE


## custom\_qr Library
This library provides functionality to generate QR codes and a wide variety of options to customize them.

![QR Code Example](.media/image.png)


<br>
### Installation

1. **Install the library**:

``` sh
pip install custom_qr
```

2. **Verify Installation**:

``` sh
pip list
```

**NOTE: It is recommended to use a virtual environment.**

### Usage

Here's how you can use the library to generate QR codes and customize them:

1. **Import the library**:

``` python
from custom_qr import QrCode
from custom_qr import (
    ERROR_CORRECTION_LEVEL_H,
    ERROR_CORRECTION_LEVEL_Q,
    ERROR_CORRECTION_LEVEL_M,
    ERROR_CORRECTION_LEVEL_L
)
```

**Note**: The constants `ERROR_CORRECTION_LEVEL_H`, `ERROR_CORRECTION_LEVEL_Q`, `ERROR_CORRECTION_LEVEL_M`, and `ERROR_CORRECTION_LEVEL_L` are not necessary if you do not want to specify the error correction level.
2. **Create a QR Code**:

``` python
qr = QrCode()
matrix, version = qr.generate("https://www.qrcode.com/")
```

To specify a version and/or an error correction level:

``` python
qr = QrCode()
matrix, version = qr.generate("https://www.qrcode.com/", version=6, error_correction=ERROR_CORRECTION_LEVEL_Q)
```

3. **Print on Console**:

``` python
qr.print_qr_console(matrix)
```

**Note**: The QR code printed on the console is not scannable. To get a working version, display it on screen or save it to a file.
4. **Get Image Version**:
To display on screen, it's important to get the image version of the QR code. The image version is needed for all customization functions and to save to a file:

``` python
img = qr.create_qr_image(matrix)
```

5. **Display**:

``` python
qr.display_qr(img)
```

6. **Save Image**:

``` python
qr.create_image_file(img, filename="qr.png")
```

**Note**: The default filename is "qr.png".
