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.

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.1.tar.gz (3.2 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.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: url_short-0.1.1.tar.gz
  • Upload date:
  • Size: 3.2 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.1.tar.gz
Algorithm Hash digest
SHA256 5e2cca7e0d0f590ef74894a31397b14f03bec55bddcbcbca1d96ab32ddc92e9c
MD5 0795193805a0f589281a2e35f60e1c9f
BLAKE2b-256 ad112ebf0c7183aa4c50e5b5823ed3167621205ff56a86350a096dd103b43172

See more details on using hashes here.

File details

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

File metadata

  • Download URL: url_short-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 24f9d86066d839f8f1e75f8601fa41ba40faf9fbb8ed9d45d833786ced83ce34
MD5 ae6bd81aa0e0335900ae370cbae0b726
BLAKE2b-256 977bfc211a835c6228b42360e328d61cf4f8df963552e5cb366e5bdc3ac82aa6

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