Official Python SDK for the ME-QR API
Project description
ME-QR Python SDK
Official Python client for the ME-QR API.
Requirements
- Python 3.9+
httpx(optional, recommended) or standardurllib
Installation
pip install me-qr
# with faster HTTP client (recommended):
pip install "me-qr[httpx]"
Or copy me_qr.py directly into your project.
Quick Start
from me_qr import MEQRClient
client = MEQRClient(token="YOUR_API_TOKEN")
# URL QR code → save to file
result = client.create_link("https://me-qr.com")
result.save("qr.png")
# Get as data URL for web embedding
print(result.to_data_url()) # data:image/png;base64,...
Usage
Run the example
python example.py
URL QR code
result = client.create_link("https://example.com")
result.save("link.png")
Styled QR code
from me_qr import QROptions
options = QROptions(
size=600,
foreground_color="#2563eb",
background_color="#f8fafc",
error_correction="H",
)
result = client.create_link("https://me-qr.com", format="svg", options=options)
result.save("styled.svg")
Wi-Fi QR code
from me_qr import WIFI_ENC_WPA # 'wpa/wpa2'
result = client.create_wifi(
ssid="MyNetwork",
password="secret",
encryption=WIFI_ENC_WPA, # 'wpa/wpa2' | 'wpa3' | 'wep' | 'none' | 'raw'
)
result.save("wifi.png")
vCard QR code
result = client.create_vcard(
name="Alex",
last_name="Smith",
phones=[{"phone": "+1234567890", "type": 0}], # type: 0=general, 1=work
emails=[{"email": "alex@example.com", "type": 0}], # type: 0=general, 1=corporate
organization="ACME Corp",
)
result.save("vcard.png")
Email QR code
result = client.create_email(
email="support@example.com",
subject="Hello",
body="Message body",
)
result.save("email.png")
Plain text QR code
result = client.create_text("Hello, World!")
result.save("text.png")
Full control (create)
from me_qr import QRType
result = client.create(
qr_type=QRType.WIFI,
title="Office Wi-Fi",
qr_fields_data={"ssid": "Corp", "password": "pass", "encryption": "wpa/wpa2"},
format="svg",
)
QR Type IDs (QRType enum)
| Value | ID | Description |
|---|---|---|
QRType.LINK |
1 | URL / website |
QRType.PDF |
4 | PDF document |
QRType.EMAIL |
5 | |
QRType.VCARD |
7 | Contact card |
QRType.APP_STORE |
8 | App Store / Play |
QRType.WHATSAPP |
9 | |
QRType.AUDIO |
10 | Audio file |
QRType.MAP |
11 | GPS location |
QRType.TEXT |
15 | Plain text |
QRType.IMAGE |
16 | Image gallery |
QRType.WIFI |
17 | Wi-Fi credentials |
QRType.PHONE |
27 | Phone call |
QRType.SMS |
28 | SMS |
QRType.VIDEO |
29 | Video |
Error Handling
from me_qr import MEQRError
try:
result = client.create_link("https://example.com")
except MEQRError as e:
print(f"Error {e.status_code}: {e}")
print(e.response)
Output Formats
| Format | Use case |
|---|---|
png |
Print, web, general use |
jpeg |
Smaller file size |
svg |
High-resolution / infinite scale |
json |
Raw QR matrix data |
Links
- 🌐 Website: me-qr.com
- 📖 API Docs: me-qr.com/api/doc
- 💰 Pricing: me-qr.com/pricing
- 🐛 Issues: GitHub Issues
- 🐍 PyPI: pypi.org/project/me-qr
License
MIT © ME-QR
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
me_qr-1.0.0.tar.gz
(6.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
me_qr-1.0.0-py3-none-any.whl
(6.3 kB
view details)
File details
Details for the file me_qr-1.0.0.tar.gz.
File metadata
- Download URL: me_qr-1.0.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4dff981f96f757048a2c0ff910439607c9be92e5a984d5e535e70b27217ecaec
|
|
| MD5 |
d10782b5825bab21c262c0ea8dad0b08
|
|
| BLAKE2b-256 |
c3d79d2f81c3cad539a090752b4b8d3541030ebaabb269643c95537a4083792d
|
File details
Details for the file me_qr-1.0.0-py3-none-any.whl.
File metadata
- Download URL: me_qr-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be3820806fcaef8f8fcd9c97eec538cdf45544c8f76e9d4daee107ac0f000737
|
|
| MD5 |
e78c83539dc1e4debc372371f7ddbfd0
|
|
| BLAKE2b-256 |
668449b826a313d330a7d862f17e3b9442fd52e58cee19b50cab69063cc599eb
|