getmyqr


Namegetmyqr JSON
Version 1.0 PyPI version JSON
download
home_pagehttps://https://mrfidal.in/py/getmyqr
SummaryA simple QR code generator using a free API
upload_time2024-11-23 18:28:04
maintainerNone
docs_urlNone
authorMrFidal
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://https://mrfidal.in/py/getmyqr",
    "name": "getmyqr",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "MrFidal",
    "author_email": "mrfidal@proton.me",
    "download_url": "https://files.pythonhosted.org/packages/13/39/abdb24ef189580d4ba12783269070ff487951b8eab99a7e06337acf2735c/getmyqr-1.0.tar.gz",
    "platform": null,
    "description": "# GetMyQR\r\n\r\nA simple Python package to generate QR codes using a free API.\r\n\r\n## Installation\r\n\r\nYou can install the package using `pip`:\r\n\r\n```bash\r\npip install getmyqr\r\n```\r\n\r\n## Usage\r\n\r\nYou can use the QR code generator in your Python script or from the command line.\r\n\r\n### Example 1: Python Script\r\n\r\nGenerate a QR code with default size and high quality:\r\n\r\n```python\r\nfrom getmyqr import generate_qr_code\r\n\r\noutput_file = generate_qr_code(\"Hello, world!\", \"hello_world_default.png\")\r\n\r\nif \"Error\" not in output_file:\r\n    print(f\"QR code saved to: {output_file}\")\r\nelse:\r\n    print(output_file)\r\n```\r\n\r\nGenerate a QR code with custom size and quality:\r\n\r\n```python\r\noutput_file_custom = generate_qr_code(\"Custom QR code\", \"custom_qr_medium.png\", size=\"400x400\", quality=\"M\")\r\n\r\nif \"Error\" not in output_file_custom:\r\n    print(f\"QR code saved to: {output_file_custom}\")\r\nelse:\r\n    print(output_file_custom)\r\n```\r\n\r\nGenerate a QR code with low quality:\r\n\r\n```python\r\noutput_file_low = generate_qr_code(\"Low quality QR code\", \"low_quality_qr.png\", size=\"500x500\", quality=\"L\")\r\n\r\nif \"Error\" not in output_file_low:\r\n    print(f\"QR code saved to: {output_file_low}\")\r\nelse:\r\n    print(output_file_low)\r\n```\r\n\r\n### Example 2: Command Line\r\n\r\nTo generate a QR code from the command line, use the following command:\r\n\r\n```bash\r\ngetmyqr \"Hello, world!\" --output \"hello_world_qr.png\"\r\n```\r\n\r\nTo generate a QR code with custom size and quality:\r\n\r\n```bash\r\ngetmyqr \"Hello, world!\" --output \"hello_world_qr_custom.png\" --size \"400x400\" --quality \"Q\"\r\n```\r\n\r\n## Parameters\r\n\r\n- `--size`: Customizes the size of the QR code. Example: `400x400` (default is `300x300`).\r\n- `--quality`: Customizes the error correction level. Options: `L` (low), `M` (medium), `Q` (quartile), `H` (high). Default is `H`.\r\n- `--output`: The name of the output file. Default is `qrcode.png`.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A simple QR code generator using a free API",
    "version": "1.0",
    "project_urls": {
        "Homepage": "https://https://mrfidal.in/py/getmyqr"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b63cee116203171b03f658e868208d9d287d9506d1ace5dc02a56869d9366c99",
                "md5": "e51c6089738042a036a7fd46e3a4a971",
                "sha256": "21da3e86c862e336af2bc9b357cd2080776ef175df63e8882c40fcb9c57f18e0"
            },
            "downloads": -1,
            "filename": "getmyqr-1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e51c6089738042a036a7fd46e3a4a971",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 3298,
            "upload_time": "2024-11-23T18:28:02",
            "upload_time_iso_8601": "2024-11-23T18:28:02.418443Z",
            "url": "https://files.pythonhosted.org/packages/b6/3c/ee116203171b03f658e868208d9d287d9506d1ace5dc02a56869d9366c99/getmyqr-1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1339abdb24ef189580d4ba12783269070ff487951b8eab99a7e06337acf2735c",
                "md5": "403d5134736521e31fa6318e7880bd73",
                "sha256": "a49f37e8be5b4e8910c6e7252225aabc124432635fe16a44878b4897cd793e98"
            },
            "downloads": -1,
            "filename": "getmyqr-1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "403d5134736521e31fa6318e7880bd73",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 2779,
            "upload_time": "2024-11-23T18:28:04",
            "upload_time_iso_8601": "2024-11-23T18:28:04.550839Z",
            "url": "https://files.pythonhosted.org/packages/13/39/abdb24ef189580d4ba12783269070ff487951b8eab99a7e06337acf2735c/getmyqr-1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-23 18:28:04",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "getmyqr"
}
        
Elapsed time: 0.43749s