Dev.to WebDev πŸ›  Dev πŸ‘ 1

Generate QR codes, Wi-Fi QR codes and barcodes from a URL (no library needed)

Sometimes you just need a QR code in an email, a PDF ticket or a no-code tool, and you don't want to bundle a library. With QRKit it's one GET request, and you get back a PNG or SVG. A QR code in one GET i

Sometimes you just need a QR code in an email, a PDF ticket or a no-code tool, and you don't want to bundle a library. With QRKit it's one GET request, and you get back a PNG or SVG.

A QR code in one GET

import requests
H = {"X-RapidAPI-Key": KEY, "X-RapidAPI-Host": "qrkit-qr-code-barcode-generator.p.rapidapi.com"}
png = requests.get("https://qrkit-qr-code-barcode-generator.p.rapidapi.com/qr",
                   params={"data": "https://example.com", "size": 300, "format": "png"}, headers=H).content
open("qr.png", "wb").write(png)

Options: format (png/svg), size, color, bg, margin, ecc (error correction), and transparent.

Wi-Fi login QR for cafΓ©s and Airbnbs

/qr/wifi?ssid=CafeGuest&password=coffee123&security=WPA

Guests scan it and they're on the network. No typing.

Contact card QR (vCard)

/qr/vcard?name=Jane Doe&phone=+447700900123&[email protected]&org=Acme

Barcodes

/barcode?type=ean13&data=400638133393 also supports Code128, UPC-A, ISBN, ISSN, ITF and PZN, with an optional human-readable label.

Free tier: 500 calls/month. QRKit on RapidAPI

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.