Metadata-Version: 2.1
Name: getmyqr
Version: 1.0
Summary: A simple QR code generator using a free API
Home-page: https://https://mrfidal.in/py/getmyqr
Author: MrFidal
Author-email: mrfidal@proton.me
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

# GetMyQR

A simple Python package to generate QR codes using a free API.

## Installation

You can install the package using `pip`:

```bash
pip install getmyqr
```

## Usage

You can use the QR code generator in your Python script or from the command line.

### Example 1: Python Script

Generate a QR code with default size and high quality:

```python
from getmyqr import generate_qr_code

output_file = generate_qr_code("Hello, world!", "hello_world_default.png")

if "Error" not in output_file:
    print(f"QR code saved to: {output_file}")
else:
    print(output_file)
```

Generate a QR code with custom size and quality:

```python
output_file_custom = generate_qr_code("Custom QR code", "custom_qr_medium.png", size="400x400", quality="M")

if "Error" not in output_file_custom:
    print(f"QR code saved to: {output_file_custom}")
else:
    print(output_file_custom)
```

Generate a QR code with low quality:

```python
output_file_low = generate_qr_code("Low quality QR code", "low_quality_qr.png", size="500x500", quality="L")

if "Error" not in output_file_low:
    print(f"QR code saved to: {output_file_low}")
else:
    print(output_file_low)
```

### Example 2: Command Line

To generate a QR code from the command line, use the following command:

```bash
getmyqr "Hello, world!" --output "hello_world_qr.png"
```

To generate a QR code with custom size and quality:

```bash
getmyqr "Hello, world!" --output "hello_world_qr_custom.png" --size "400x400" --quality "Q"
```

## Parameters

- `--size`: Customizes the size of the QR code. Example: `400x400` (default is `300x300`).
- `--quality`: Customizes the error correction level. Options: `L` (low), `M` (medium), `Q` (quartile), `H` (high). Default is `H`.
- `--output`: The name of the output file. Default is `qrcode.png`.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
