Skip to main content

A python module that shorterns urls using TinyURL API, no API token required.

Project description

URL Shortener Module

This Python module, url_short, is a convenient tool designed to shorten URLs using the TinyURL API. This module aims to provide a simple and efficient way to generate shortened URLs for any given long URL.

Table of Contents

Installation

To use the url_short module, you can install it via pip from the command line. Ensure that you have the correct Python version (3.x) before installation. The necessary dependencies will be automatically installed when you use pip.

pip install url_short

Usage

You can utilize the shorten_url function provided by the url_short module to shorten any given URL using the TinyURL API. Here's a basic example:

import url_short as u

shortened_url = u.shorten_url('https://www.example.com/very-long-url')
print(shortened_url)
# Output: 'https://tinyurl.com/abc123'

Documentation

The url_short module includes detailed documentation in the form of docstrings. These docstrings offer insights into the module's purpose, function arguments, return values, and usage examples. You can access this documentation using Python's help() function or by viewing the docstrings directly in your code editor.

import url_short as u
help(u.shorten_url)

Features

  • URL Shortening: The module efficiently shortens long URLs using the TinyURL API.
  • Error Handling: Robust error handling ensures smooth operation even in case of invalid URLs.
  • Customization: Users can customize the shortened URLs for specific needs.
  • Documentation: Detailed docstrings provide comprehensive information for easy understanding and usage.

Contributing

Contributions to this project are encouraged! If you wish to enhance the module, fix any issues, or introduce new features, please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your changes.
  3. Implement and thoroughly test your modifications.
  4. Commit your changes and push them to your fork.
  5. Open a pull request against the original repository.

License

This project is licensed under the MIT License. For more details, refer to the LICENSE file.

Feel free to customize this README.md template to suit the specific requirements of your URL shortener module. Good luck with your project!

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

url_short-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

url_short-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file url_short-0.1.0.tar.gz.

File metadata

  • Download URL: url_short-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.0

File hashes

Hashes for url_short-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8c6f46ff3a50a0d75fbb648ead5fe6b48cdb1b5c295d15676408ec1266aff8ee
MD5 12a4b997fc7de2a2b33e30c72c62dc6a
BLAKE2b-256 b7f591c7d287eae2692896e229075e2a73890d09260184969c93e2c198193122

See more details on using hashes here.

File details

Details for the file url_short-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: url_short-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.8.0

File hashes

Hashes for url_short-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b66532198d8a774b417b9191efd1ab7903188b1b66ef25b2ba52910b9c72e4cf
MD5 47b61b0fee14e54348182502c20be6dc
BLAKE2b-256 56f0c1a7966acfaee8e211e500313dcff8fa7caecd07f3f5ae4bdfb50a090c47

See more details on using hashes here.

Supported by

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