url-trailed
is a Python package that allows you to shorten URLs effortlessly using the API provided by URL Trailed.
- Shorten long URLs with ease.
- Simple and lightweight.
- Uses the reliable URL Trailed API.
Install the package via pip:
pip install -i https://test.pypi.org/simple/ url-trailed
Here's how you can use the package to shorten a URL:
from url_trailed import shorten_url
# Replace with your long URL
long_url = "https://example.com/some/very/long/url"
short_id = shorten_url(long_url)
short_url = "https://url-trailed.vercel.app/r/" + short_id
print(f"Shortened URL: {short_url}")
- Python 3.10 or higher.
- Internet connection to access the API.
The package uses the URL Trailed API to perform URL shortening. For more details about the API, visit their documentation.
Contributions are welcome! Feel free to open issues or submit pull requests to improve the package.
This project is licensed under the MIT License. See the LICENSE file for details.
Special thanks to URL Trailed for providing the API used in this package.