A Python library for URL shortening and QR code generation.
Project description
urllink
urllink is a simple Python library that allows you to shorten URLs and generate QR codes using online APIs.
Features
- 🔗 URL Shortener via
shrtco.deAPI - 📷 QR Code Generator via
goqr.meAPI - 🌐 Internet connectivity check before making API calls
Installation
pip install urllink
Example Usage
from urllink import shorten_url, generate_qrcode
# Shorten a URL
short_url = shorten_url("https://example.com")
print("Shortened URL:", short_url)
# Generate a QR code
qr_path = generate_qrcode("https://example.com", save_path="output/qrcode.png", size=300)
print("QR Code saved to:", qr_path)
Generates a QR code from the provided text or URL.
Function Reference
Parameters:
data (str, required): The content to encode into the QR code.
save_path (str, optional): Full path (including filename) to save the image.
Default: "qrcode.png" saved in the current directory.
size (int, optional): The size of the QR code image in pixels.
Default: 500
Returns:
The file path where the QR code image was saved.
An error message string if generation fails.
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
urllink-1.1.0.tar.gz
(3.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
File details
Details for the file urllink-1.1.0.tar.gz.
File metadata
- Download URL: urllink-1.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5f354de294c2e95da438170415c4a51998147a955300deb26ec97461e55bb28
|
|
| MD5 |
cebce6c96929bbe2bf3c6dd37e0b7b89
|
|
| BLAKE2b-256 |
7db84bb90fd5718d3099786f0a131649158924d55dfeafd9838aa8b76a913e52
|
File details
Details for the file urllink-1.1.0-py3-none-any.whl.
File metadata
- Download URL: urllink-1.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ceb7c5c5ba6b35509f82c9ecad4c4126958d690f593c7c0141c94db07a61d944
|
|
| MD5 |
39265a9dd7153248dd407c0663589677
|
|
| BLAKE2b-256 |
7a3335d1dc42c4a6a08bc3e1757bb2bd8ead760d551f913068ab76c60522ed90
|