Skip to main content

A simple Python package to shorten URLs via TinyURL with CLI support.

Project description

mahdi-url-shortener

PyPI version License: MIT

mahdi-url-shortener is a simple and lightweight Python package to shorten URLs using TinyURL service.
It provides both a programmatic API and a command-line interface (CLI) for convenience.


Features

  • Shorten a single URL with a simple function call
  • Batch shorten URLs from one or multiple files
  • User-friendly CLI with interactive menu
  • Supports Python 3.7 and above

Installation

You can install the package from PyPI:

pip install mahdi-url-shortener

```Use the CLI Run the CLI directly from the terminal
mahdi

Usage
Import and shorten URLs programmatically

from mahdi import create_short_url

long_url = "https://example.com/some/very/long/url"
short_url = create_short_url(long_url)
print(f"Shortened URL: {short_url}")

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

mahdi_url_shortener-0.1.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

mahdi_url_shortener-0.1.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file mahdi_url_shortener-0.1.2.tar.gz.

File metadata

  • Download URL: mahdi_url_shortener-0.1.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for mahdi_url_shortener-0.1.2.tar.gz
Algorithm Hash digest
SHA256 faa122da1d99b8558db4c38a6903d48abe018c4d9c921bd04e52b32cc9dfda3f
MD5 ebdd13d31bae06e31794b28c0833af1e
BLAKE2b-256 ed8d6d18ced65428102e5ce012bc6e3ede656b98573fbc3eb5a57ce50a4eeaff

See more details on using hashes here.

File details

Details for the file mahdi_url_shortener-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mahdi_url_shortener-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c51d3862a095d24fe04f4da5f130020c6aa8bf3aa1ad9b5805650eb612cf5ff0
MD5 b8429e478f746bbd4cb078d0a7d9f6ec
BLAKE2b-256 52c7f31182eaa113c8e7f2d2bd1cb4e75a70ba8b62a535e4382c4038265bb36d

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