Skip to main content

a library to short links using tinyurl

Project description

PyLeb_ShortLink Documentation

PyLeb_ShortLink Documentation

Overview

PyLeb_ShortLink is a Python library designed for URL shortening using the TinyURL API.

Installation

Install PyLeb_ShortLink using pip:

pip install PyLeb_ShortLink

Quick Start

import shortlink

# Shorten a URL
shortened_url = shortlink.short("https://example.com")

print("Shortened URL:", shortened_url)

License

PyLeb_ShortLink is distributed under the New Global License Version 3.0 (NewGBLv3).

API Reference

short(Link: str) -> str

Shortens the given URL using the TinyURL API.

Parameters:

  • Link (str): The URL to be shortened.

Returns:

  • str: The shortened URL.

If the URL cannot be shortened, the function returns a message indicating the failure.

Dependencies

  • requests: Used for making HTTP requests.

Contribution

Contributions, bug reports, and feature requests are welcome on GitHub.

Contact

For inquiries or support, please contact the author:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyLeb_ShortLink-1.0.0.tar.gz (39.0 kB view hashes)

Uploaded Source

Built Distribution

PyLeb_ShortLink-1.0.0-py3-none-any.whl (27.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page