urllink
urllink is a simple Python library that allows you to shorten URLs and generate QR codes using online APIs.
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.
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.2.0.tar.gz
(3.1 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.2.0.tar.gz.
File metadata
- Download URL: urllink-1.2.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f0a3fe40435f3b9a59f7fb841e3e2b7dd44dcf341f39a290e22f81dafe4be34
|
|
| MD5 |
8aa3aa1f772ca6c9400615ae83996c58
|
|
| BLAKE2b-256 |
212d7c38031cb5f538bf9aede78958440a9eb623f6710aa74823fd879b5ac27b
|
File details
Details for the file urllink-1.2.0-py3-none-any.whl.
File metadata
- Download URL: urllink-1.2.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 |
4ea8dba32d46f101e9097cc96d29302668d59df2ebabf11ba415ecc59a80a234
|
|
| MD5 |
9ca6e7d5e1b89bebf8b256dbe40b7360
|
|
| BLAKE2b-256 |
0cab4a2857cfa83a7354e54cbee32bccaac9d2946a2cc8ebd9a5949846c968be
|