Skip to main content

MakeQR

PyPI Downloads Python Test License

Generate QR codes for links, WiFi networks, contacts, calendar events, one-time-password keys, geo points, e-mail, SMS and plain text — from the command line or from Python.

Installation

pip install makeqr -U

Or, with uv:

uv tool install makeqr

To run it without installing anything:

uvx makeqr --help

Commands

Command Encodes Example
link A URL makeqr link https://example.com
wifi WiFi network access makeqr wifi -s wpa -p s3cret HomeWiFi
geo Geographic coordinates makeqr geo -lat 55.75 -long 37.61
mailto A pre-filled e-mail makeqr mailto -s Hello to@example.com
sms A pre-filled SMS makeqr sms -r +79876543210 -b 'on my way'
tel A phone number makeqr tel +79876543210
text Arbitrary text makeqr text 'hello world'
vcard A vCard 3.0 contact makeqr vcard -f John -t +79876543210 Doe
mecard A MeCard contact makeqr mecard -f John -t +79876543210 Doe
event A calendar event makeqr event -s Standup -st 2026-09-01T12:00
otp A TOTP/HOTP key makeqr otp -l alice@example.com -s BASE32SECRET

The scheme may be omitted from a link — makeqr link example.com encodes https://example.com.

Run makeqr <command> --help for the options of a single command.

Global options

Global options go before the command name:

makeqr -o code.png -e high wifi --security wpa --password s3cret HomeWiFi
Option Default Description
-o, --output Write the image here; the extension picks the format
-e, --error-correction medium low, medium, quartile or high
-s, --box-size 8 Pixel size of a single QR module
-b, --border 1 Width of the quiet zone, in modules
-v, --verbose off Print the model and the encoded payload
-q, --quiet off Do not print the QR code to the terminal
-V, --version Show the version and exit

Without --output the code is only printed to the terminal. Passwords are masked in verbose output.

Usage example

makeqr -v wifi --password TopSecret --security wpa HomeWiFi
 __   __  _______  ___   _  _______  _______  ______
|  |_|  ||   _   ||   | | ||       ||       ||    _ |
|       ||  |_|  ||   |_| ||    ___||   _   ||   | ||
|       ||       ||      _||   |___ |  | |  ||   |_||_
|       ||       ||     |_ |    ___||  |_|  ||    __  |
| ||_|| ||   _   ||    _  ||   |___ |      | |   |  | |
|_|   |_||__| |__||___| |_||_______||____||_||___|  |_|

Model: {"ssid":"HomeWiFi","security":"wpa","password":"**********","hidden":false}
Encoded: WIFI:S:HomeWiFi;P:***;T:WPA;;
                                                              
  ██████████████  ████    ██████  ██  ██      ██████████████  
  ██          ██    ██████████████      ██    ██          ██  
  ██  ██████  ██      ██      ██    ██████    ██  ██████  ██  
  ██  ██████  ██  ██████          ██  ██  ██  ██  ██████  ██  
  ██  ██████  ██  ██    ████          ████    ██  ██████  ██  
  ██          ██  ██  ████        ██████████  ██          ██  
  ██████████████  ██  ██  ██  ██  ██  ██  ██  ██████████████  
                  ████  ██████    ██████                      
  ██      ██  ██████████    ██  ██████  ██  ██████████    ██  
  ██    ██      ██    ████  ██████            ████████        
    ██████████████      ████    ██        ████    ████    ██  
  ██        ██  ████    ██    ██  ████  ████  ██        ██    
    ██████    ██    ██      ██████████    ████  ████    ██    
  ██    ██        ████    ██    ██    ██        ██████        
  ████████    ████    ████████████  ████      ██      ██  ██  
            ██  ██      ██  ██  ████████  ████      ██    ██  
      ██      ██    ██    ████      ██  ██  ██        ██  ██  
  ██    ██      ██      ████████  ██    ██    ██████████      
      ██    ████  ████  ██      ████████    ██      ████  ██  
        ██████  ████████████  ████████  ██    ██  ██          
  ████    ██  ██  ██      ██████  ██████  ██████████    ██    
                  ██████  ██      ████    ██      ████  ██    
  ██████████████  ██        ██████      ████  ██  ██  ██  ██  
  ██          ██        ██  ██      ████  ██      ████        
  ██  ██████  ██  ██  ██  ████    ██    ████████████████      
  ██  ██████  ██              ██  ██    ████        ██    ██  
  ██  ██████  ██    ██          ████████                ████  
  ██          ██            ████  ████  ██  ██    ████  ████  
  ██████████████  ████████    ██████████  ████████  ██  ██    
                                                              

Docker

docker run --rm ghcr.io/shpaker/makeqr:latest link https://t.me/shpaker

To keep the generated file, mount a directory and write into it:

docker run --rm -v "$PWD:/out" ghcr.io/shpaker/makeqr:latest -o /out/code.png link https://example.com

As a Python module

from makeqr import MakeQR, QRMailToModel

qr = MakeQR(
    QRMailToModel(
        to="foo@bar.baz",
        subject="Awesome subject!",
    )
)

data: bytes = qr.make_image_data()  # PNG bytes
qr.save("mail.png")                 # or straight to a file

Every model exposes the payload it encodes:

>>> from makeqr import QRWiFiModel
>>> QRWiFiModel(ssid="HomeWiFi", security="wpa", password="TopSecret").qr_data
'WIFI:S:HomeWiFi;P:TopSecret;T:WPA;;'

Development

Requires uv and just.

uv sync          # create the environment
just lint        # ruff, formatting and ty
just test        # pytest with coverage
just fix         # auto-fix and format

Optionally, install the git hooks with prek:

uv tool install prek
just hooks

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

makeqr-5.0.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

makeqr-5.0.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file makeqr-5.0.0.tar.gz.

File metadata

  • Download URL: makeqr-5.0.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for makeqr-5.0.0.tar.gz
Algorithm Hash digest
SHA256 8c8ff5660bede62931dca5004ba660b5f99ebfa2dec34fbc356bbe83d7cba412
MD5 c5e89d3cf7e4849234ee589c59121ba5
BLAKE2b-256 fd6c7e565ea6beb568ed6e8e1dbf3fd8e8403280b0abe8d0aaacd4f7b98af129

See more details on using hashes here.

File details

Details for the file makeqr-5.0.0-py3-none-any.whl.

File metadata

  • Download URL: makeqr-5.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for makeqr-5.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bedfa69ee417b14d511117a6029e471887039b6081bde6e661aff28892e3f884
MD5 27725b02025bb58ae1070f0145cac09d
BLAKE2b-256 24a5547fb50bc7724a596d51c5c143ec256791799bd15d10bc7a425b21abb34f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

5.0.0 This release

2 files

4.4.1

2 files

4.4.0

2 files

4.3.1

2 files

4.3.0

2 files

4.2.1

2 files

4.2.0

2 files

4.1.0

2 files

4.0.3

2 files

4.0.2

2 files

4.0.1

2 files

3.0.2

2 files

3.0.1

2 files

3.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page